This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dom.spec.whatwg.org/#interface-documentfragment [[ A host-including inclusive ancestor is either an inclusive ancestor or a host-including inclusive ancestor of an object's root's host, if any ]] I think I know what this is trying to say (it's trying to be a transitive definition through 'host', I assume), but I think this could do with being rephrased to be clearer. :-)
Would it help if I repeat "object's root's host" (put it after inclusive ancestor)?
Even with that, I still have no idea what it's trying to say. Replacing all the terms of art with "A" and "B" and so on, what's the sentence supposed to be? An A is either a B or an A of a C, if any"? I don't know what that would mean either, for any definition of A, B, and C.
An A is either a B of C or an A of C, if any.
I think adding "of an object's root's host" after "an inclusive ancestor" might clarify things a little bit, but I'm not clear on whether "if any" applies just to "an A of C" or if applies to the whole "a B of C or an A of C".
> An A is either a B of C or an A of C, if any. "An A is ... an A" doesn't make sense. I think this is why this sentence is causing me trouble.
(In reply to comment #5) > > An A is either a B of C or an A of C, if any. > > "An A is ... an A" doesn't make sense. I think this is why this sentence is > causing me trouble. Yeah... as I mentioned on IRC, recursive definitions don't work very well in plain English. However, you don't seem to have a problem with the definition of "root", which works the same way: [[ The root of an object is itself, if its parent is null, or else it is the root of its parent. ]]
Basically, this definition means (IIUC) that a "host-including inclusive ancestor" is like a regular "inclusive ancestor" except that when you climb up the tree to determine the ancestors, you also pop out of any "host" barrier you meet along the way and continue going up.
> The root of an object is itself, if its parent is null, or else it is > the root of its parent. That definition makes sense because it starts with "The A of a B is". Essentially, it's of the form: Object.Root == Object.Parent ? Object.Parent.Root : Object; What's the equivalent here? The current definition starts with "The A is", but doesn't say the A of what, so there's nothing to refer to to recurse.
(In reply to comment #8) > What's the equivalent here? The current definition starts with "The A is", > but doesn't say the A of what, so there's nothing to refer to to recurse. I think it's more like: def hostIncludingInclusiveAncestor(object): if object.Root.Host: return hostIncludingInclusiveAncestory(object.Root.Host) else: return object.Root
Then the definition should be: "The host-including inclusive ancestor of an object is the object's root's host's host-including inclusive ancestor if the object's root has a host, otherwise, it is the object's root." ...or some such.
I think this is it: "An object /A/ is a host-including inclusive ancestor of an object /B/ if either /A/ is an inclusive ancestor of /B/, or if /B/'s root has an associated host and /A/ is a host-including inclusive ancestor of /B/'s root's host."
Yeah, that's way better. Thanks.
https://github.com/whatwg/dom/commit/21f1fde39e1d00059fa9e6cfefaeb30e9c25d72d