- From: mantou <notifications@github.com>
- Date: Fri, 20 Aug 2021 14:18:54 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 20 August 2021 21:19:06 UTC
example:
```js
class MyElement extends HTMLElement {
constructor() {
super();
this.attachShadow({mode: 'open'});
this.shadowRoot.innerHTML = '<div tabindex=1>foucesable</div>';
}
connectedCallback() {
this.shadowRoot.querySelector('div').focus();
}
}
customElements.define('my-ele', MyElement);
document.body.append(new MyElement());
document.querySelector('my-ele').blur();
document.body.append(`current active element: ${document.activeElement.tagName}`);
```
Firefox: current active element: MY-ELE
Chrome: current active element: BODY
Safari: current active element: BODY
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1008
Received on Friday, 20 August 2021 21:19:06 UTC