OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Polymer Authors. All rights reserved. | |
2 // Use of this source code is goverened by a BSD-style | |
3 // license that can be found in the LICENSE file. | |
4 | |
5 (function() { | |
6 var thisFile = 'shadowdom.js'; | |
7 var base = ''; | |
8 Array.prototype.forEach.call(document.querySelectorAll('script[src]'), functio
n(s) { | |
9 var src = s.getAttribute('src'); | |
10 var re = new RegExp(thisFile + '[^\\\\]*'); | |
11 var match = src.match(re); | |
12 if (match) { | |
13 base = src.slice(0, -match[0].length); | |
14 } | |
15 }); | |
16 base += '../../../third_party/polymer/ShadowDOM/src/'; | |
17 | |
18 [ | |
19 'sidetable.js', | |
20 'wrappers.js', | |
21 'wrappers/events.js', | |
22 'wrappers/NodeList.js', | |
23 'wrappers/Node.js', | |
24 'querySelector.js', | |
25 'wrappers/node-interfaces.js', | |
26 'wrappers/CharacterData.js', | |
27 'wrappers/Element.js', | |
28 'wrappers/HTMLElement.js', | |
29 'wrappers/HTMLContentElement.js', | |
30 'wrappers/HTMLShadowElement.js', | |
31 'wrappers/HTMLTemplateElement.js', | |
32 'wrappers/HTMLUnknownElement.js', | |
33 'wrappers/generic.js', | |
34 'wrappers/ShadowRoot.js', | |
35 'ShadowRenderer.js', | |
36 'wrappers/Document.js', | |
37 'wrappers/Window.js', | |
38 'wrappers/MutationObserver.js', | |
39 'wrappers/override-constructors.js' | |
40 ].forEach(function(src) { | |
41 document.write('<script src="' + base + src + '"></script>'); | |
42 }); | |
43 | |
44 })(); | |
OLD | NEW |