-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update inputs setting and change listener (#16)
* Make the inputs readonly, add mutationObserver for setting inputs, add change listener to inputs-wrapper * Update tests: get rid of slotchange event, add test for inputs
- Loading branch information
1 parent
5abf02f
commit 604d2f2
Showing
6 changed files
with
61 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<script> | ||
window.dispatchSlotChange = function(customField) { | ||
// NOTE(yuriy): Workaround not to use timeouts | ||
const evt = new CustomEvent('slotchange'); | ||
customField.shadowRoot.querySelector('slot').dispatchEvent(evt); | ||
}; | ||
|
||
window.dispatchChange = function(el) { | ||
const evt = new CustomEvent('change'); | ||
const evt = new CustomEvent('change', {bubbles: true}); | ||
el.dispatchEvent(evt); | ||
}; | ||
</script> |