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

Is reparenting a gotcha? #2

Open
jakearchibald opened this issue Mar 1, 2019 · 2 comments
Open

Is reparenting a gotcha? #2

jakearchibald opened this issue Mar 1, 2019 · 2 comments

Comments

@jakearchibald
Copy link
Owner

In the common case, each ParserChunk will be addressing a new node, but in the event of a parser error a ParserChunk may be used to move an existing node.

I'm worried that developers won't code expecting this, and end up with weird bugs as a result.

We could add a boolean to the ParserChunk to indicate that the node isn't new. The idea is this will increase the likelihood that developers will handle that possibility.

@jakearchibald
Copy link
Owner Author

cc @domenic.

@domenic
Copy link

domenic commented Mar 5, 2019

Adding the boolean feels unnecessary to me over just documenting it. (And having a do-the-right-thing DOMWritable sink.)

But, I think we should keep this open to track any instances of the problem occurring, especially once we get more hands-on experience.

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