Skip to content

dom: Node.prototype.isSameNode() is unimplemented #72

Description

@ImLunaHey

Area: dom

Summary

Node.prototype.isSameNode() is not implemented — the method is absent from the prototype, so any call throws.

FAIL [0/9]  dom/nodes/Node-isSameNode.html
  — doctypes should be compared on reference: doctype1.isSameNode is not a function

Expected

Per DOM §dom-node-issamenode: isSameNode(otherNode) is a legacy alias that returns true when otherNode is this node (identity, like ===) and false otherwise (including for null).

Root cause

Node methods are wired up in wrap(id) in crates/js/src/bootstrap/document.jsisSameNode should sit next to contains (line 1214) / compareDocumentPosition (line 1221) / isEqualNode, all of which already exist. It's just never defined.

Good first issue

cargo run --release -p wpt-runner -- ./wpt dom/nodes/Node-isSameNode.html 50

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions