• twiss 10 months ago

    For a more authoritative reference, the WebIDL spec explains: (https://webidl.spec.whatwg.org/#idl-objects)

    > the browser-implemented DOM objects (implementing interfaces such as Node and Document) that provide access to a web page’s contents to JavaScript running in the page would be platform objects. These objects might be exotic objects, implemented in a language like C++, or they might be native JavaScript objects. Regardless, an implementation of a given set of IDL fragments needs to be able to recognize all platform objects that are created by the implementation. This might be done by having some internal state that records whether a given object is indeed a platform object for that implementation, or perhaps by observing that the object is implemented by a given internal C++ class. How exactly platform objects are recognized by a given implementation of a set of IDL fragments is implementation specific.

    • _nalply 10 months ago
      • Ezek-iel 10 months ago

        There is a typo at the first sentence of the conclusion

        "JavaScript objects aren't actually DOM nodes at all."

        instead of

        "DOM nodes aren't actually Javascript objects at all."

        • politelemon 10 months ago

          502 error currently

          • peterburkimsher 10 months ago

            Same here

          • fricze 10 months ago

            tl;dr; JavaScript DOM nodes are just handles to Blink DOM nodes. The article doesn't peek under the hood tbh. If you want to look under the hood you should analyze the Blink implementation.