This example shows that the focusin
event in shadow DOM is not composed unlike other events such as click
- run
npm install
- run
npm run dev
- navigate to
http://localhost:5173/
- click on a button
- output should be:
focusin listener - shadow root
focusin listener - document
click listener - shadow root
click listener - document
- click on another button
- output should be:
focusin listener - shadow root
click listener - shadow root
click listener - document
focusin listener - document
should be present in both steps 2
and 4
focusin listener - document
is only present in step 2