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

Nonsense script error when inserting new elements into DOM #11191

Closed
wxiaoguang opened this issue Jul 5, 2022 · 1 comment
Closed

Nonsense script error when inserting new elements into DOM #11191

wxiaoguang opened this issue Jul 5, 2022 · 1 comment
Labels
Bug 🐞 This is a bug with existing functionality not behaving as expected

Comments

@wxiaoguang
Copy link

wxiaoguang commented Jul 5, 2022

Steps to reproduce

<!DOCTYPE html>
<html>
<head>
	<script>
		window.addEventListener('error', function(e) {alert('error');});
	</script>
</head>
<body>

<div class="page-content">
</div>

<script>
	const pageContent = document.querySelector('.page-content');
	const el = document.createElement('div');
	el.textContent = 'dummy'; // required
	pageContent.append(el); // BUG, triggers the error event
	// setTimeout(()=>{pageContent.append(el);}, 0); // BUG, triggers the error event
	// setTimeout(()=>{pageContent.append(el);}, 500); // no bug .....
</script>
</body>
</html>

Expected behavior

No error event

Actual behavior

Nonsense error event

Device & build information

  • Device: iOS
  • Build version: Firefox Daylight 102.0 (11640) , including 101.x

┆Issue is synchronized with this Jira Task

@wxiaoguang wxiaoguang added the Bug 🐞 This is a bug with existing functionality not behaving as expected label Jul 5, 2022
@wxiaoguang
Copy link
Author

Stale?

@wxiaoguang wxiaoguang closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 This is a bug with existing functionality not behaving as expected
Projects
None yet
Development

No branches or pull requests

1 participant