Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Add build manifest and PolymerLoader
Browse files Browse the repository at this point in the history
- Depends on WeakMap
  • Loading branch information
dfreedm committed Oct 16, 2013
1 parent 375e7cb commit 29fcfa0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.json
@@ -0,0 +1,4 @@
[
"../WeakMap/weakmap.js",
"MutationObserver.js"
]
35 changes: 35 additions & 0 deletions mutation-observers.js
@@ -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>');

})();

0 comments on commit 29fcfa0

Please sign in to comment.