| OLD | NEW | 
|---|
| 1 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file | 
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a | 
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 /* This file defines the module loader for the dart runtime. | 5 /* This file defines the module loader for the dart runtime. | 
| 6 */ | 6 */ | 
| 7 | 7 | 
| 8 var dart_library; | 8 var dart_library; | 
| 9 (function (dart_library) { | 9 (function (dart_library) { | 
| 10   'use strict'; | 10   'use strict'; | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 96 | 96 | 
| 97   function library(name, defaultValue, imports, lazyImports, loader) { | 97   function library(name, defaultValue, imports, lazyImports, loader) { | 
| 98     return libraries[name] = | 98     return libraries[name] = | 
| 99       new LibraryLoader(name, defaultValue, imports, lazyImports, loader); | 99       new LibraryLoader(name, defaultValue, imports, lazyImports, loader); | 
| 100   } | 100   } | 
| 101   dart_library.library = library; | 101   dart_library.library = library; | 
| 102 | 102 | 
| 103   function import_(libraryName) { | 103   function import_(libraryName) { | 
| 104     bootstrap(); | 104     bootstrap(); | 
| 105     let loader = libraries[libraryName]; | 105     let loader = libraries[libraryName]; | 
|  | 106     if (loader == null) { | 
|  | 107       dart_utils.throwError('library not found: ' + libraryName); | 
|  | 108     } | 
| 106     return loader.load(); | 109     return loader.load(); | 
| 107   } | 110   } | 
| 108   dart_library.import = import_; | 111   dart_library.import = import_; | 
| 109 | 112 | 
| 110   function start(libraryName) { | 113   function start(libraryName) { | 
| 111     let library = import_(libraryName); | 114     let library = import_(libraryName); | 
| 112     let _isolate_helper = import_('dart/_isolate_helper'); | 115     let _isolate_helper = import_('dart/_isolate_helper'); | 
| 113     _isolate_helper.startRootIsolate(library.main, []); | 116     _isolate_helper.startRootIsolate(library.main, []); | 
| 114   } | 117   } | 
| 115   dart_library.start = start; | 118   dart_library.start = start; | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 130     // TODO(vsm): DOM facades? | 133     // TODO(vsm): DOM facades? | 
| 131     // See: https://github.com/dart-lang/dev_compiler/issues/173 | 134     // See: https://github.com/dart-lang/dev_compiler/issues/173 | 
| 132     NodeList.prototype.get = function(i) { return this[i]; }; | 135     NodeList.prototype.get = function(i) { return this[i]; }; | 
| 133     NamedNodeMap.prototype.get = function(i) { return this[i]; }; | 136     NamedNodeMap.prototype.get = function(i) { return this[i]; }; | 
| 134     DOMTokenList.prototype.get = function(i) { return this[i]; }; | 137     DOMTokenList.prototype.get = function(i) { return this[i]; }; | 
| 135     HTMLCollection.prototype.get = function(i) { return this[i]; }; | 138     HTMLCollection.prototype.get = function(i) { return this[i]; }; | 
| 136 | 139 | 
| 137   } | 140   } | 
| 138 | 141 | 
| 139 })(dart_library || (dart_library = {})); | 142 })(dart_library || (dart_library = {})); | 
| OLD | NEW | 
|---|