Last active
August 16, 2021 01:40
-
-
Save joshyu/4685744849c1889b80a3c6156197ba2f to your computer and use it in GitHub Desktop.
Revisions
-
joshyu revised this gist
Aug 5, 2021 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,3 @@ When we want to detect which internal component we are clicking on some webcomponent,we can use **event.composed** to check whether the event is broadcasted through a webcomponent, and then check the array list returned from **event.composedPath()** to look up the DOM, if found then we can confirm we are clicking on the specified DOM node and do some specific things. https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath -
joshyu revised this gist
Aug 5, 2021 . No changes.There are no files selected for viewing
-
joshyu revised this gist
Aug 5, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ When we want to detect which internal component we are clicking on some webcomponent,we can use **event.composed** to check whether the event is broadcasted through a webcomponent, and then check the array list returned from **event.composedPath()** to look up the DOM, if found then we can confirm we are clicking on the specified DOM node and do some specific things. -
joshyu revised this gist
Aug 5, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ When we want to detect which internal component we are clicking on some webcomponent,we can use **event.composed** to check whether the event is broadcasted through a webcomponent, and then check the array list returned from **event.composedPath** to look up the DOM, if found then we can confirm we are clicking on the specified DOM node and do some specific things. -
joshyu created this gist
Aug 5, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ When we want to detect which internal component we are clicking on some webcomponent,we can use *event.composed* to check whether the event is broadcasted through a webcomponent, and then check the array list returned from *event.composedPath* to look up the DOM, if found then we can confirm we are clicking on the specified DOM node and do some specific things.