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

Help guide has the wrong implementation of Node.replaceChild() #25

Closed
ZachRHale opened this issue Sep 1, 2017 · 1 comment
Closed

Comments

@ZachRHale
Copy link

This took me a second to realize while using the plugin.

https://developer.mozilla.org/en-US/docs/Web/API/Node/replaceChild

Instead of

var DOMDocumentFragment = domJSON.toDOM(jsonOutput); someDOMElement.parentNode.replaceChild(someDOMElement, DOMDocumentFragment);

it should be

var DOMDocumentFragment = domJSON.toDOM(jsonOutput); someDOMElement.parentNode.replaceChild(DOMDocumentFragment, someDOMElement);

at least in Chrome/60.0.3112.113 in the console

azaslavsky added a commit that referenced this issue Sep 5, 2017
@azaslavsky
Copy link
Owner

Good eye! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants