- From: Keith Cirkel <notifications@github.com>
- Date: Mon, 09 Oct 2023 03:50:32 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 9 October 2023 10:50:37 UTC
How about overloading the constructor of an `EventTarget` to allow assignment of a parentNode? ```webidl [Exposed=*] interface EventTarget { constructor(parent?: EventTarget); } ``` If the `parent` is `undefined` or `null` then the `EventTarget` is considered to have no parent, otherwise assert that `parent` is `EventTarget`. For `Node`, `ShadowRoot` and `Document`, the `constructor` remains as-is and they continue to use their custom `get the parent` algos. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/583#issuecomment-1752777679 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/583/1752777679@github.com>
Received on Monday, 9 October 2023 10:50:37 UTC