JavaScript Indexing

settings_applicationsEventTarget  >   settings_applicationsNode  >   settings_applicationsElement  >   settings_applicationsHTMLElement  >   settings_applicationsHTMLImageElement  >   settings_applications[[Prototype]]

{object_name}

Editing

stringcrossOrigin

Details

연결되는 리소스의 CORS를 설정하거나 조회한다.

설명

이미지 리소스를 요청할 때 사용할 CORS 모드를 문자열 키워드로 지정한다. 지정하지 않으면 CORS없이 이미지를 가져온다.

사용되는 키워드는 다음과 같다.

anonymous
<img> 요소의 요청은 CORS로 설정되고 자격 증명 모드는 same-origin으로 설정된다. 이는 문서가 로드된 것과 동일한 출처에서 이미지를 가져오는 경우 CORS가 활성화되고 자격 증명이 전송됨을 의미한다.
use-credentials
<img> 요소의 요청은 CORS 모드와 자격 증명 포함 모드를 사용한다. 모든 이미지의 요청은 출처 도메인과 관계없이 CORS를 적용한다.
빈 문자열 값을 지정하면 anonymous 모드가 적용된다.

구문

형식
htmlImageElement.crossOrigin

속성 명세

명세
분류설명
writableyes

지원 웹브라우저