W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2017

Re: [whatwg] Is the "document" identifier defined in the standards?

From: Domenic Denicola <d@domenic.me>
Date: Mon, 24 Apr 2017 05:14:11 +0000
To: Kevin Chen <cyaugin@yahoo.com>, "whatwg@whatwg.org" <whatwg@whatwg.org>
Message-ID: <BY2PR05MB195905E976C1C6D895791BFBDF1F0@BY2PR05MB1959.namprd05.prod.outlook.com>
From: whatwg [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of Kevin Chen

> But I do not see a guarantee within the standards that the browser will provide an object called "document" containing the current document object (irrespective of the fact that this does seem to be the case in practice).

This is specified at https://html.spec.whatwg.org/#window as

> [Unforgeable] readonly attribute Document document;

and if you click on "document" there it takes you to https://html.spec.whatwg.org/#dom-document-2 which says

> The document IDL attribute, on getting, must return this Window object's associated Document.

Received on Monday, 24 April 2017 05:14:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 24 April 2017 05:14:43 UTC