dom icon indicating copy to clipboard operation
dom copied to clipboard

"Element" has no method signature for "getElementById"

Open GPrimola opened this issue 2 years ago • 2 comments

https://dom.spec.whatwg.org/commit-snapshots/fa3aea5ff68161cabe9a3fe95fe6240a4ddd4412/#element

Element

This interface defines the attribute id but it doesn't define a method signature for getElementById, and I think it should.

The reason is the same as for attribute tagName which has a getElementsByTagName method signature.

GPrimola avatar Sep 24 '22 16:09 GPrimola

The note preceding the mixin where getElementById is declared explains this:

Web compatibility prevents the getElementById() method from being exposed on elements (and therefore on ParentNode).

bathos avatar Sep 24 '22 19:09 bathos

Thank you @bathos !

GPrimola avatar Sep 24 '22 23:09 GPrimola