javascript - Use zone.js to detect current execution context from anywhere? -


with zone.js possible determine current execution context anywhere? ie., if zone-bound function calls function calls settimeout(myfn) can determine current execution context within myfn()? if so, please provide simple example of how so.

every time fork() zone, accessing zone object within zone's context return forked zone.

the following experiment demonstrates behavior:

var b = function() { console.log('-->',zone) };  var = function() { settimeout(b,5); };  zone.fork().run(function() { zone.x = 'hi'; a(); });  settimeout(function() { console.log('==>', zone); }, 1); settimeout(function() { console.log('==>', zone); }, 10); 

here's happens when paste console:

enter image description here


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -