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

javascript: URLs, window.onerror, and filenames #1960

Closed
Ms2ger opened this issue Oct 24, 2016 · 1 comment
Closed

javascript: URLs, window.onerror, and filenames #1960

Ms2ger opened this issue Oct 24, 2016 · 1 comment

Comments

@Ms2ger
Copy link
Member

Ms2ger commented Oct 24, 2016

<!DOCTYPE html>
<a href=javascript:}>...</a>
<script>
window.onerror = (m,f)=> w(f);
document.body.firstChild.click()
</script>

Logs the empty string in Chrome and javascript:} in Fx. We should probably define the correct answer.

@domenic
Copy link
Member

domenic commented Oct 24, 2016

The current plan is actually to punt on this entirely until JavaScript has some kind of spec for stack traces. See #958 (comment), which I'd like to roll this bug up into.

The filename/column number/line number are in fact left unspecified for now; the spec will say something like "initialise them to appropriate values". (In particular, we no longer derive the filename from the script.) This allows the better results that in practice browsers exhibit for e.g. eval code. In the future, this may become specified in detail when the JavaScript spec specifies error stack traces in detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants