This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14176 - onerror: If the script is not same-origin, window.onerror should be invoked with arguments ("Script error.", "", 0)
Summary: onerror: If the script is not same-origin, window.onerror should be invoked w...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 06:54 UTC by contributor
Modified: 2011-11-10 23:45 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-09-16 06:54:40 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html
Multipage: http://www.whatwg.org/C#creating-scripts
Complete: http://www.whatwg.org/c#creating-scripts

Comment:
If the script is not same-origin, window.onerror should be invoked with
arguments ("Script error.", "", 0)

Posted from: 85.227.155.223 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.5.8; U; en) Presto/2.9.168 Version/11.51
Comment 1 Ms2ger 2011-09-16 14:51:07 UTC
*** Bug 14177 has been marked as a duplicate of this bug. ***
Comment 2 Ian 'Hixie' Hickson 2011-10-19 23:19:56 UTC
Could you elaborate?
Comment 3 Simon Pieters 2011-10-20 21:38:22 UTC
So for <script src> scripts, if the script's URL's origin (after redirects) is not the same as the script's origin, then in step 5 in http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#creating-scripts the "report the error" should use the arguments ("Script error.", "", 0).

Why invoke it at all? Firefox/Chrome/Opera have already implemented this. We considered not invoking onerror at all, but it didn't solve anything and isn't compatible (we found one site expecting onerror to be invoked for a cross-origin <script src> with a compile error).
Comment 4 Ian 'Hixie' Hickson 2011-10-26 23:58:34 UTC
Basically I need to better define what the onerrror arguments are. This might require having "report an error" take arguments itself.
Comment 5 Ian 'Hixie' Hickson 2011-11-10 23:32:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.

See also bug 14182, bug 14177, bug 14174, and bug 14175.
Comment 6 contributor 2011-11-10 23:45:19 UTC
Checked in as WHATWG revision r6819.
Check-in comment: Tighten up onerror's definition.
http://html5.org/tools/web-apps-tracker?from=6818&to=6819