-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Script error always thrown on page load #10817
Comments
@kalkih can you clarify what the bug is? Is the error popup supposed to show at a different time? |
@kalkih I think the link to the source code is wrong. Should most likely be this: https://github.com/kalkih/firefox-script-error-ios/blob/main/index.html @dnarcese The bug is that the alert is shown at all. It shouldn't be. It should only be shown on an error. And no error should be emitted by just loading the page. |
I think it's also related to this one: I wrote a reproducible demo (more complex) |
We're still running into this bug.
This is the source of the page <html>
<body>
<script>
var errStringified = (err) =>
JSON.stringify(
Object.getOwnPropertyNames(Object.getPrototypeOf(err)).reduce((acc, cur) => {
acc[cur] = err[cur];
return acc;
}, {})
);
window.addEventListener('error', e => {
document.body.innerText = errStringified(e)
})
</script>
</body>
</html> |
This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions! |
Well, nobody cared or tested the bug, just a "stale bot" tried to close the pending issues? Also see my example: Nonsense script error when inserting new elements into DOM #11191 |
Steps to reproduce
The example to reproduce the issue consists of a window.addEventListener("error") which fires on the error and displays it in an alert
Source code for the example: https://github.com/kalkih/firefox-script-error-ios/blob/main/index.html
Expected behavior
No error should be thrown on page load
Actual behavior
An error is thrown on page load which fires the
window.addEventListener("error")
Device & build information
Notes
With "Enhanced Tracking Protection" switched to on, the error doesn't seem to be thrown when accessing a root page. Can be reproduced by serving the
index.html
page in the example locally on "/"┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: