question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to execute 'appendChild' on 'Node'

See original GitHub issue
// generate sandboxed iframe
	var vbody = document.appendChild(document.createElement('body'));
	var frame = vbody.appendChild(document.createElement('iframe'));
Uncaught DOMException: Failed to execute 'appendChild' on 'Node': Only one element on document allowed.

An error is occur when using the polyfill.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
SivanMehtacommented, Jun 18, 2018

@shtse8 Do you happen to know how or why flags=gated fixed this issue? I would like to avoid this issue in the future, but am unsure about blindly copying a querystring to fix the problem.

1reaction
JakeChampioncommented, Mar 28, 2019

@rpokrovskij That is because you are using the always flag, not all polyfills work in all browsers but with the always flag you are asking for all polyfills to be served to all browsers. If you want to use always flag you should combine it with the gated flag to ensure that polyfills do not run on browsers which do not require them. E.G. https://polyfill.io/v3/polyfill.js?flags=always,gated&features=Element.prototype.closest%2CElement.prototype.classList%2CElement.prototype.matches

What was the full polyfill.io url you used and what was the browser you tested on and it’s full user-agent string?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to execute 'appendChild' on 'Node': parameter 1 is not ...
This can happen if you accidentally are not dragging the element that does have an id assigned (for example you are dragging the...
Read more >
Uncaught TypeError: Failed to execute 'appendChild' on 'Node'
In developing a Javascript function, I ran into the following error when I looked at my console: Uncaught TypeError: Failed to execute 'appendChild'...
Read more >
Uncaught TypeError: Failed to execute 'appendChild' on 'Node'
I have list which is display using web method in asp.net c#. The list gets display perfectly fine. Now what i want is...
Read more >
Failed to execute 'appendChild' on 'Node': parameter 1 is not ...
JavaScript : Error: Failed to execute ' appendChild ' on ' Node ': parameter 1 is not of type ' Node ' [...
Read more >
HTML : Failed to execute 'appendChild' on 'Node' - YouTube
HTML : Failed to execute ' appendChild ' on ' Node ': The new child element is null [ Beautify Your Computer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found