Skip to content

ProcessingInstruction missing nodeName property #505

Description

@cjbarth

Describe the bug
The bug is reproduced in a the test suite in the xpath library.
goto100/xpath#116 (comment)

Currently ProcessingInstruction is failing this check:

isNodeLike = function (value) {
        return value 
            && typeof value.nodeType === "number" 
            && Number.isInteger(value.nodeType)
            && value.nodeType >= 1
            && value.nodeType <= 11
            && typeof value.nodeName === "string";
    };

To Reproduce
The linked comment has a reproduction on this.

Expected behavior
Since ProcessingInstruction is a type of Node, I expect all the properties that Node has to be available on ProcessingInstruction.

Runtime & Version:
xmldom version: 0.8.8
runtime version: Node 14

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedExternal contributions welcomespec:DOM Level 3https://www.w3.org/TR/DOM-Level-3-Core/

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions