Navigation Menu

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

Assertion failure with inserting child with id into orphaned subtree #1874

Closed
Ms2ger opened this issue Mar 10, 2014 · 2 comments · Fixed by #1925
Closed

Assertion failure with inserting child with id into orphaned subtree #1874

Ms2ger opened this issue Mar 10, 2014 · 2 comments · Fixed by #1925
Labels
A-content/dom Interacting with the DOM from web content

Comments

@Ms2ger
Copy link
Contributor

Ms2ger commented Mar 10, 2014

The following asserts:

<script>
var s = document.createElement("select");
s.id = "x";
document.createElement("div").appendChild(s);
</script>
task 'ScriptTask' failed at 'assertion failed: { let node: JS<Node> = NodeCast::from(element); node.is_in_doc() }', /src/components/script/dom/document.rs:529
@aydinkim
Copy link

Do we need to add "set_is_in_doc" into the node_inserted or something?
It looks that it does not work except "insert" and "remove" of node.

@Ms2ger
Copy link
Contributor Author

Ms2ger commented Mar 11, 2014

No, this assertion points out a real bug: we shouldn't be trying to add the ID to the document's idmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants