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 12927 - Define what "content attribute's document" means
Summary: Define what "content attribute's document" means
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 18:22 UTC by Boris Zbarsky
Modified: 2011-08-11 17:50 UTC (History)
6 users (show)

See Also:


Attachments

Description Boris Zbarsky 2011-06-09 18:22:16 UTC
http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflect when talking about attributes of type HTMLElement has this text:

  Let candidate be the element that the document.getElementById() method would
  find when called on the content attribute's document if it was passed as its
  argument the current value of the corresponding content attribute.

Ignoring for the moment the "if it was" which should be "if it were", I have no idea what "content attribute's document" means.  Attributes don't have documents.  Is the ownerDocument of the element involved meant?  Or the document the element is in, if any?  Or something else?
Comment 1 Ian 'Hixie' Hickson 2011-06-10 19:26:20 UTC
This is defined here:
http://www.whatwg.org/specs/web-apps/current-work/complete/infrastructure.html#dom-trees

"The Document of a Node (such as an element) is the Document that the Node's ownerDocument IDL attribute returns. When a Node is in a Document then that Document is always the Node's Document, and the Node's ownerDocument IDL attribute thus always returns that Document."


Leaving open for the typo.
Comment 2 Boris Zbarsky 2011-06-11 00:06:45 UTC
This text is really not clear because it's talking about the "content attribute", not the "content Attr node".... and the attribute is not a Node.  For that matter, Attr will stop being a Node in the near future.  If you really want the ownerDocument, I'd talk about the element's ownerDoument (and perhaps make this a link to the definition of "element's document" if you don't actually use the term "ownerDocument" here).

But on a separate note, I don't understand why it's using the ownerDocument in this situation instead of the document the element is in, if any.....
Comment 3 Aryeh Gregor 2011-06-13 20:38:19 UTC
(In reply to comment #2)
> But on a separate note, I don't understand why it's using the ownerDocument in
> this situation instead of the document the element is in, if any.....

Is it possible for an element to be in a document other than its ownerDocument?  If so, how?
Comment 4 Boris Zbarsky 2011-06-13 22:56:51 UTC
> Is it possible for an element to be in a document other than its ownerDocument?

It's possible for an element to not be in a document at all while its ownerDocument is non-null.
Comment 5 Michael[tm] Smith 2011-08-04 05:04:24 UTC
mass-moved component to LC1
Comment 6 Ian 'Hixie' Hickson 2011-08-11 17:49:33 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale:

The content attribute and the Attr node are one and the same, but you have a good point about Attr moving away from being a Node. I've explicitly defined "document of a content attribute" now.

Also fixed the typo.
Comment 7 contributor 2011-08-11 17:50:54 UTC
Checked in as WHATWG revision r6417.
Check-in comment: Attr is moving away from being a Node
http://html5.org/tools/web-apps-tracker?from=6416&to=6417