a634d8ffc7
R=jmesserly@google.com Review URL: https://codereview.chromium.org//20414002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25505 260f80e4-7a28-3924-810f-c04153c831b5
37 lines
819 B
JavaScript
37 lines
819 B
JavaScript
/*
|
|
* Copyright 2013 The Polymer Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style
|
|
* license that can be found in the LICENSE file.
|
|
*/
|
|
|
|
(function() {
|
|
|
|
var thisFile = 'html_import.debug.js';
|
|
var scopeName = 'HTMLImports';
|
|
var modules = [
|
|
'src/Parser.js',
|
|
'src/HTMLImports.js',
|
|
'src/boot.js'
|
|
];
|
|
|
|
// export
|
|
|
|
window[scopeName] = {
|
|
entryPointName: thisFile,
|
|
modules: modules
|
|
};
|
|
|
|
// bootstrap
|
|
|
|
var script = document.querySelector('script[src*="' + thisFile + '"]');
|
|
var src = script.attributes.src.value;
|
|
var basePath = src.slice(0, src.indexOf(thisFile));
|
|
|
|
if (!window.Loader) {
|
|
var path = basePath + 'tools/loader/loader.js';
|
|
document.write('<script src="' + path + '"></script>');
|
|
}
|
|
document.write('<script>Loader.load("' + scopeName + '")</script>');
|
|
|
|
})();
|