Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| index c195512b4bc623017f68f4b8890cb0f894c28f71..6dda6e7f4811f7fb2b4d1a1fb930c2c958401b42 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| @@ -578,6 +578,17 @@ class CodeEmitterTask extends CompilerTask { |
| js['isolateProperties'].def( |
| js['oldIsolate'][namer.isolatePropertiesName]), |
| + // isolateProperties.$currentScript = |
| + // document && (document.currentScript || |
|
ngeoffray
2013/02/19 15:22:26
Don't you need to use globalThis.document in the f
ahe
2013/02/19 15:50:37
I have changed this to (typeof document == 'object
|
| + // document.scripts[document.scripts.length - 1]); |
| + js['isolateProperties'][r'$currentScript'].assign( |
| + js['document'].binary( |
| + '&&', |
| + js['document']['currentScript'].binary( |
| + '||', |
| + js['document']['scripts'][ |
| + js['document']['scripts']['length'] - 1]))), |
|
ngeoffray
2013/02/19 15:22:26
So this works on all browsers now?
ahe
2013/02/19 15:50:37
As far as I can tell.
|
| + |
| // var isolatePrototype = oldIsolate.prototype; |
| js['isolatePrototype'].def(js['oldIsolate']['prototype']), |