dom
dom copied to clipboard
"Element" has no method signature for "getElementById"
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.
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).
Thank you @bathos !