- From: <bugzilla@jessica.w3.org>
- Date: Wed, 07 Aug 2013 22:30:34 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22485 --- Comment #7 from Dimitri Glazkov <dglazkov@chromium.org> --- (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > > > This has the benefit that x.implementation.createHTMLDocument gives > > > consistent results, irregardless of which window is running the script that > > > acts on x. > > > > Can you help me understand this? If I have main document A that contains an > > iframe B, and A reaches into B and attempts to createHTMLDocument on its > > document, we need to make sure that the document has the registration > > context from B, right? > > Right. The spec today has this: > > "Whenever created, each document must retain a weak reference to the Window > object of the browsing context's active document. This referenced Window > object is called the registration context." > > I assume? this means that if A reaches into B and does > > doc = B.contentDocument.implementation.createHTMLDocument(); > > 'doc' should be associated with the registration context of A, because the > window that's running the script, etc. is A's. > > If you think it is B, I am prepared to believe you, but then what does > > doc2 = doc.implementation.createHTMLDocument(); > > associate doc2 with? In terms of browsing contexts, B has fled the scene. > > So I'm proposing that documents are associated with a registration context, > and when creating documents in specific situations, that association is > transmitted to the new document in a process like quantum entanglement. This is reasonable. We can start very small, by: 1) declaring the registration context its own thing, then 2) defining how a new registration context is created during http://www.whatwg.org/specs/web-apps/current-work/#read-html 3) defining how it's passed along to new Document instances in specific imperative APIs. WDYT? This should take care of the Window/Document conundrum cleanly and allow future refinements toward solving bug 22466 -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 7 August 2013 22:30:35 UTC