Skip to content

Use Node.*_NODE instead of defining constants #893

Closed
@zpao

Description

@zpao

I think this should be safe, cross browser at this point, but we should make sure. We shouldn't ever be running this code path server side, so I don't think we have to worry about that

// this
aNode.nodeType === Node.ELEMENT_NODE;

// instead of
var ELEMENT_NODE_TYPE = 1;
aNode.nodeType === ELEMENT_NODE_TYPE;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions