Aaron,
Thanks for your replay. I have a few more questions.

> The reason it doesn't work is because the Chrome APIs are
> asynchronous.
I suspected this :) after adding setTimeout(console.log(win_id), 100);
but was not sure if this was a bug or by design.

Now questions:
1. Let's assume that something throws an exception while callback
function run. What happens if it wasn't catch in callback? Is there a
chance to set somewhere 'big' try-catch block which could handle that?

2. I need a kind of sleep() function. I'm porting Firefox add-on where
I use generator-iterator feature and (earlier) JS debugger API to
accomplish that. Is it planned to add something like that? I would
vote for generator-iterator feature (like described in
https://developer.mozilla.org/en/New_in_JavaScript_1.7) if someone
asks me.

3. A dumb question - what would be 'this' in callback function? What
is the execution context for callback, the same as for caller? Do the
caller and callback have the same global object? I suspect the answer
would be "yes" for the last two questions, just to make sure.

4. Is there a date for localStorage to appear? Drop-down menu for
toolstrips? I really need these two to make the extension somewhat
useful. Also I need file access for extension script, is it planned?

Denis
P.S. I believed I was experienced JS programmer :)
--~--~---------~--~----~------------~-------~--~----~
Chromium Discussion mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to