Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Node.*_NODE instead of defining constants #893

Closed
zpao opened this issue Jan 15, 2014 · 3 comments
Closed

Use Node.*_NODE instead of defining constants #893

zpao opened this issue Jan 15, 2014 · 3 comments

Comments

@zpao
Copy link
Member

zpao commented Jan 15, 2014

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;
@syranide
Copy link
Contributor

IE8 does not approve of this :)

@sophiebits
Copy link
Collaborator

Not sure I really see the motivation. Our current solution compresses better. :)

@zpao
Copy link
Member Author

zpao commented Jun 24, 2014

fiiiiiiiiine

@zpao zpao closed this as completed Jun 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants