This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26566 - Clarify that document.links and friends always return the same object
Summary: Clarify that document.links and friends always return the same object
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-13 07:48 UTC by contributor
Modified: 2014-09-24 17:40 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2014-08-13 07:48:46 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html
Multipage: http://www.whatwg.org/C#dom-tree-accessors
Complete: http://www.whatwg.org/c#dom-tree-accessors
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/index.html

Comment:
Clarify that document.links and friends always return the same object

Posted from: 81.242.222.5 by ms2ger@gmail.com
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
Comment 1 contributor 2014-09-12 17:50:56 UTC
Checked in as WHATWG revision r8765.
Check-in comment: require that document.images and friends always return the same object. This'll be great until either we find that browsers don't always return the same object or until someone notices that this implies that two different Documents will return the same object.
http://html5.org/tools/web-apps-tracker?from=8764&to=8765
Comment 2 Boris Zbarsky 2014-09-12 17:54:12 UTC
> this implies that two different Documents will return the same object

How so, exactly?
Comment 3 Ms2ger 2014-09-14 19:35:08 UTC
"The same object must be returned each time."; I assume Hixie was being overly pedantic here. (And that's coming from me :).)
Comment 4 Ian 'Hixie' Hickson 2014-09-14 21:08:03 UTC
Yeah. The wording is the same as in other parts of the spec, and we seem to have interop with those, so I'm leaving it as-is for now.
Comment 5 Boris Zbarsky 2014-09-14 21:27:47 UTC
Yeah, we could throw in something about each time the getter is invoked on with the same Document as "this", I guess...
Comment 6 Boris Zbarsky 2014-09-14 21:28:44 UTC
Or you could use [SameObject] and get this for free from Web IDL (which defines this a little more carefully).
Comment 7 Ian 'Hixie' Hickson 2014-09-24 17:40:33 UTC
Ok I moved the spec to [SameObject] throughout. The diff below contains this change and others, sorry for mixing them together but they were all part of one editing session.
Comment 8 contributor 2014-09-24 17:40:50 UTC
Checked in as WHATWG revision r8808.
Check-in comment: Various editorial IDL changes
https://html5.org/tools/web-apps-tracker?from=8807&to=8808