ใช่ ข้อกำหนดอย่างเป็นทางการ ระบุแอตทริบิวต์ข้ามต้นทางเป็น:
The crossorigin attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas.
คุณสามารถใช้เพื่อแก้ไขข้อผิดพลาด JavaScript เช่นบันทึกข้อผิดพลาด js:
if (securityOrigin()->canRequest(targetUrl)) {
msg = myErroe;
line = myLineNumber;
source = sourceURL;
} else {
msg = "Error!";
source = String();
line = 0;
}