This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build manifest and PolymerLoader
- Depends on WeakMap
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
"../WeakMap/weakmap.js", | ||
"MutationObserver.js" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* 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 = 'mutation-observers.js'; | ||
var scopeName = 'MutationObservers'; | ||
var modules = [ | ||
'../WeakMap/weakmap.js', | ||
'MutationObserver.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.PolymerLoader) { | ||
var path = basePath + '../tools/loader/loader.js'; | ||
document.write('<script src="' + path + '"></script>'); | ||
} | ||
document.write('<script>PolymerLoader.load("' + scopeName + '")</script>'); | ||
|
||
})(); |