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 13312 - After doing a bunch of reading, it appears to me that the crossorigin attribute was added to help WebGL on canvas. As far as I can tell, it is irrelevant when the img element is used in HTML (i.e., <img src="myPic.jpg">. If I am wrong, then could you pl
Summary: After doing a bunch of reading, it appears to me that the crossorigin attribu...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 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-07-20 17:49 UTC by contributor
Modified: 2011-08-10 22:06 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2011-07-20 17:49:57 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html
Multipage: http://www.whatwg.org/C#attr-img-crossorigin
Complete: http://www.whatwg.org/c#attr-img-crossorigin

Comment:
After doing a bunch of reading, it appears to me that the crossorigin
attribute was added to help WebGL on canvas.  As far as I can tell, it is
irrelevant when the img element is used in HTML (i.e., <img src="myPic.jpg">. 
If I am wrong, then could you please clarify how crossorigin is used in HTML? 
If I am right, then could you please clarify that this attribute is only
useful when using the canvas element.  If both of these are wrong, then plz
correctly my erroneous thinking.  :-)  Thank you.

Posted from: 129.83.31.3
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30
Comment 1 Boris Zbarsky 2011-07-20 18:15:44 UTC
The crossorigin attribute is useful any time you're planning to try to extract the pixel data from the image, whether you do it via canvas or via some other mechanism.  At the moment there are no such other mechanisms, but that might change.
Comment 2 Jonas Sicking (Not reading bugmail) 2011-07-21 01:11:43 UTC
In particular, the 2D canvas spec should be changed to not taint if the data was loaded using CORS (i.e. if the crossorigin attribute was set when the data was loaded).
Comment 3 Michael[tm] Smith 2011-08-04 05:03:03 UTC
mass-moved component to LC1
Comment 4 Ian 'Hixie' Hickson 2011-08-10 22:05:53 UTC
2D canvas is already fixed to work with this — the images are defined to be same-origin if you got it via CORS, and canvas does a simple origin check.

I've added a slight amount of explanatory material for <img crossorigin>. I'll probably add more in due course once we've got more experience with it.


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.
Comment 5 contributor 2011-08-10 22:06:09 UTC
Checked in as WHATWG revision r6410.
Check-in comment: exposition
http://html5.org/tools/web-apps-tracker?from=6409&to=6410