[Webkit-unassigned] [Bug 28269] Inspector: Improve Cookie DataGrid to Show Hidden Data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 18 09:37:09 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28269
--- Comment #20 from Pavel Feldman <pfeldman at chromium.org> 2009-08-18 09:37:07 PDT ---
(In reply to comment #19)
> > Actually, things can be even simpler. Here is how I would do this:
> > - Introduce non-Custom InspectorBackend::getCookies that would make all
> > necessary computations and call InspectorFrontend::setCookies(String,
> > ScriptObject) that you introduce. Other InspectorFrontend methods for the
> > reference + InspectorResource on how to create a ScriptObject with your data.
> > - Implement WebInspector.setCookies that would receive and process the data.
>
> This is certainly a different way of thinking for me. I'd just rather call a
> function and get a result. This approach would mean storing the cookie data
> somwhere (most likely in the WebInspector namespace), whenever getCookies is
> called. I'd rather just call getCookies and get a return value with the data.
> What is the advantage to calling a function over just returning a value?
Well, you need to pass the result within some callback to make the call
asynchronous. If you don't want to store your state / data in between the call
and response, look at DOMAgent.js. Here is a snippet you might be interested
in:
WebInspector.Cookies.prototype = {
doAsyncWork: function() {
function mycallback(results, are, here) {
// process the result here
}
var callId = WebInspector.Callback.wrap(mycallback);
InspectorController.getCookies(callId, parameters, go, here);
}
}
WebInspector.didGetCookies = WebInspector.Callback.processCallback;
Then you add 'didGetCookies' into InspectorFrontend and call it from backend
with the same callId you are getting.
--
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