DocumentType

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

DocumentType 인터페이스는 doctype을 포함하는 Node 를 나타냅니다.

EventTarget Node DocumentType

프로퍼티

부모 Node 로부터 프로퍼티를 상속받고 ChildNode 인터페이스를 구현합니다.

DocumentType.entities 읽기 전용 지원이 중단되었습니다

DTD에 선언된 엔티티의 NamedNodeMap 입니다. 이 맵의 모든 노드는 Entity 인터페이스를 구현합니다.

DocumentType.internalSubset 읽기 전용 지원이 중단되었습니다

내부 하위 집합의 DOMString 입니다. 하위 집합이 존재하지 않을 경우 null입니다. 예, "<!ELEMENT foo (bar)>".

DocumentType.name 읽기 전용

DOMString 입니다. 예, <!DOCTYPE HTML> 의 경우 "html".

DocumentType.notations 읽기 전용 지원이 중단되었습니다

DTD에 선언된 노테이션을 포함한 NamedNodeMap 입니다. 이 맵의 모든 노드는 Notation 인터페이스를 구현합니다.

DocumentType.publicId 읽기 전용

DOMString 입니다. 예, "-//W3C//DTD HTML 4.01//EN", HTML5의 경우 빈 문자열.

DocumentType.systemId 읽기 전용

DOMString 입니다. 예, "http://www.w3.org/TR/html4/strict.dtd", HTML5의 경우 빈 문자열.

메소드

부모 Node 로부터 메소드를 상속받고 ChildNode 인터페이스를 구현합니다.

ChildNode.remove() Experimental

부모의 자식 리스트로부터 객체를 제거합니다.

명세

Specification
DOM
# interface-documenttype

브라우저 호환성

함께 보기