[Webkit-unassigned] [Bug 40425] Web Inspector: provide API for content scripts to interact with the inspector
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 27 03:09:05 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40425
--- Comment #8 from Andrey Kosyakov <caseq at chromium.org> 2010-07-27 03:09:05 PST ---
(In reply to comment #7)
> (From update of attachment 62568 [details])
> I started it, but got distracted. Will continue a bit later.
>
> WebCore/inspector/InspectorController.cpp:461
> + if (m_scriptsToEvaluateOnLoad.size()) {
> Why did this move? Looks fragile in case something depends on such a move internally.
It just happened to be put at the wrong place initially -- it gets injected too late in certain cases (namely, for iframes that get attached to a a detached tree initially, and then the tree is attached to the document). The only thing that depends on this is workers debugging and it still works.
'
>
> WebCore/inspector/InspectorFrontendHost.cpp:195
> + void InspectorFrontendHost::setExtensionAPI(const String& script)
> Here and below: we should refer to extensions api as to plural.
Will fix.
> Also, we might want to make this functionality generic, no need to explicitly mention "extension" here.
Well, I guess these other APIs would still qualify as extensions, wouldn't they?
> WebCore/inspector/front-end/ElementsPanel.js:61
> + WebInspector.extensionServer.notifyObjectSelected("elements", "DOMNode");
> extensionsServer?
>
> WebCore/inspector/front-end/ElementsPanel.js:61
> + WebInspector.extensionServer.notifyObjectSelected("elements", "DOMNode");
> What does "elements" stand for? Should it be a const?
It's a panel id. Agree, will make a const.
> WebCore/inspector/front-end/ExtensionAPI.js:31
> + var extensionAPI = function(InjectedScriptHost, inspectedWindow, injectedScriptId)
> extensionsAPI
>
> WebCore/inspector/front-end/ExtensionAPI.js:31
> + var extensionAPI = function(InjectedScriptHost, inspectedWindow, injectedScriptId)
> This looks as if it is injected into the target page. You don't use InjectedScriptHost, inspectWindow and injectedScriptID, do you?
>
It is injected into the front-end page, but otherwise it's the same as if it were a tatget page (the means used to do injection are the same). injectedScriptId is actually used to derive unique object ids on the client side.
> WebCore/inspector/front-end/ExtensionAPI.js:55
> + listeners[i] = listeners[listeners.length - 1];
> splice?
Yes!
--
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