i trying access global variables in addons entry point in debugger. since not web application there no window object , functions define globally not directly accessible in debugger's console. appreciated.
sdk addons not have have no shared global object. each module has own global shared functionality injected, prominently require()
function provides access exported objects other modules.
for debugging console.log(this)
in module , access logged object about:debugging console addon via rightclick -> store global variable on console output.
also note global object not same top level scope in file. var
declarations, this.foo = ...
assignments , and function bar() {}
statements attached global object, let
, const
or in iife not.
so getting access object not same having console run in same scope.
simply logging objects need access , binding logged objects current console trick me.
Comments
Post a Comment