Skip to content

constructor: global document requirement #102

@krichprollsch

Description

@krichprollsch

Some types defined in the DOM specs require global document access to be properly created.

The new Document() constructor steps are to set this’s origin to the origin of current global object’s associated Document. [HTML]

https://dom.spec.whatwg.org/#dom-document-document

The new DocumentFragment() constructor steps are to set this’s node document to current global object’s associated Document.

https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment

The new Text(data) constructor steps are to set this’s data to data and this’s node document to current global object’s associated Document.

https://dom.spec.whatwg.org/#dom-text-text

The new Comment(data) constructor steps are to set this’s data to data and this’s node document to current global object’s associated Document.

https://dom.spec.whatwg.org/#dom-comment-comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions