[Webkit-unassigned] [Bug 75973] Web Inspector: DOMAgent.getDocument should take an optional frameId argument

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 10 22:20:09 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=75973





--- Comment #5 from Pavel Feldman <pfeldman at chromium.org>  2012-01-10 22:20:09 PST ---
(In reply to comment #4)
> I was just experimenting and found DOMAgent.getDocument lacking if I only care about a sub frame. Consider an WebView like Safari's Snippet Editor that has an editor and a preview view in one WebVIew. The user inspecting only cares about the content of the preview frame.
> 

To support this complete story, we need to maintain dom agent instance per document (both on backend and front-end sides). And that implies the complexities I was mentioning above. If you put a copy of the inspector into such a WebView and allow one such WebView to exist for page at a time, things would work out of the box.

> Your likely right, using RuntimeAgent.evaluate might work. Could I use the frameId parameter on RuntimeAgent.evaluate to evaluate "document" and convert that to a node?

I would think so.

> How does the DOMAgent handle that if the child nodes have two parentNodes (document or the iframe element)?

As of today, children of the <iframe> (document owner element) are its #document children. Parens of them are <iframe> element. See innerChildNode / innerParent code in InspectorDOMAgent.

Whatever you are doing, please consider upstreaming it to the WebKit. We are currently working on more editing capabilities, new scripts layout, etc. Would be great if what you do could fit the overall Web Inspector story.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list