mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
release v0.7.8
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
@@ -601,6 +601,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
}
|
||||
scope.watchShadow = watchShadow;
|
||||
scope.upgradeDocumentTree = upgradeDocumentTree;
|
||||
scope.upgradeDocument = upgradeDocument;
|
||||
scope.upgradeSubtree = addedSubtree;
|
||||
scope.upgradeAll = addedNode;
|
||||
scope.attached = attached;
|
||||
@@ -612,11 +613,9 @@ window.CustomElements.addModule(function(scope) {
|
||||
function upgrade(node, isAttached) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
var is = node.getAttribute("is");
|
||||
var definition = scope.getRegisteredDefinition(is || node.localName);
|
||||
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
|
||||
if (definition) {
|
||||
if (is && definition.tag == node.localName) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
} else if (!is && !definition.extends) {
|
||||
if (is && definition.tag == node.localName || !is && !definition.extends) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
}
|
||||
}
|
||||
@@ -910,6 +909,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
initializeModules();
|
||||
}
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeDocument = scope.upgradeDocument;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
@@ -920,13 +920,15 @@ window.CustomElements.addModule(function(scope) {
|
||||
};
|
||||
}
|
||||
}
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
if (elt.import) {
|
||||
upgradeDocument(wrap(elt.import));
|
||||
}
|
||||
};
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(window.wrap(elt.import));
|
||||
};
|
||||
}
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
|
||||
4
CustomElements.min.js
vendored
4
CustomElements.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
@@ -692,12 +692,12 @@ window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
var isIE = scope.isIE;
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
|
||||
var importParser = {
|
||||
documentSelectors: IMPORT_SELECTOR,
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
map: {
|
||||
link: "parseLink",
|
||||
script: "parseScript",
|
||||
@@ -748,6 +748,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
elt.import = elt.__doc;
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
@@ -810,6 +811,8 @@ window.HTMLImports.addModule(function(scope) {
|
||||
trackElement: function(elt, callback) {
|
||||
var self = this;
|
||||
var done = function(e) {
|
||||
elt.removeEventListener("load", done);
|
||||
elt.removeEventListener("error", done);
|
||||
if (callback) {
|
||||
callback(e);
|
||||
}
|
||||
@@ -818,7 +821,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
};
|
||||
elt.addEventListener("load", done);
|
||||
elt.addEventListener("error", done);
|
||||
if (isIE && elt.localName === "style") {
|
||||
if (isIE11OrOlder && elt.localName === "style") {
|
||||
var fakeLoad = false;
|
||||
if (elt.textContent.indexOf("@import") == -1) {
|
||||
fakeLoad = true;
|
||||
@@ -865,7 +868,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
|
||||
if (!this.isParsed(n)) {
|
||||
if (this.hasResource(n)) {
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -888,7 +891,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
return this.dynamicElements.indexOf(elt) >= 0;
|
||||
},
|
||||
hasResource: function(node) {
|
||||
if (nodeIsImport(node) && node.import === undefined) {
|
||||
if (nodeIsImport(node) && node.__doc === undefined) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -962,7 +965,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
this.documents[url] = doc;
|
||||
}
|
||||
elt.import = doc;
|
||||
elt.__doc = doc;
|
||||
}
|
||||
parser.parseNext();
|
||||
},
|
||||
|
||||
4
HTMLImports.min.js
vendored
4
HTMLImports.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
||||
2
MutationObserver.min.js
vendored
2
MutationObserver.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
||||
2
ShadowDOM.min.js
vendored
2
ShadowDOM.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.7",
|
||||
"version": "0.7.8",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
||||
34
build.log
34
build.log
@@ -1,33 +1,33 @@
|
||||
BUILD LOG
|
||||
---------
|
||||
Build Time: 2015-07-15T17:22:18-0700
|
||||
Build Time: 2015-08-03T15:43:30-0700
|
||||
|
||||
NODEJS INFORMATION
|
||||
==================
|
||||
nodejs: v2.3.4
|
||||
nodejs: v2.4.0
|
||||
gulp: 3.9.0
|
||||
gulp-audit: 1.0.0
|
||||
gulp-concat: 2.6.0
|
||||
gulp-header: 1.2.2
|
||||
gulp-uglify: 1.2.0
|
||||
run-sequence: 1.1.1
|
||||
web-component-tester: 3.3.1
|
||||
run-sequence: 1.1.2
|
||||
web-component-tester: 3.3.7
|
||||
|
||||
REPO REVISIONS
|
||||
==============
|
||||
webcomponentsjs: 83cd82b847c1fbeab6ba9a40d822c7d4cc96367a
|
||||
webcomponentsjs: 74f8cc0ec94fada90fd70be0771f4fbb8957fd47
|
||||
|
||||
BUILD HASHES
|
||||
============
|
||||
CustomElements.js: f77fa5739800df7721b1e2bb86bdd8f260ef672d
|
||||
CustomElements.min.js: f1ba945213ce0495cb93919caa6d050ef114fbf5
|
||||
HTMLImports.js: c5473ac4fc64180ba40da4679479ed5903feb54f
|
||||
HTMLImports.min.js: 401ea71282cb28c1af168d7c08defecab18f5afb
|
||||
MutationObserver.js: 2cc42498f20f5b3842c6b5e8f7735d111967b579
|
||||
MutationObserver.min.js: 39a017771ac32f3edc8881b7ea20d0b2013d103e
|
||||
ShadowDOM.js: fd1d36923e47ed2c48719485dc7768a854e09015
|
||||
ShadowDOM.min.js: f771f33aab417207f8e198500918f74c1dce7314
|
||||
webcomponents-lite.js: 77d1bace03f086a89f9a8346fa1974205ba130b5
|
||||
webcomponents-lite.min.js: e87572819aedb8268109af569158d65911d8e398
|
||||
webcomponents.js: c4b4dd834dc76bba3b45e143adbfaae19bd0d340
|
||||
webcomponents.min.js: fd64b22600db44a3a428b538c468f18069435f4f
|
||||
CustomElements.js: 3bc8695c4d9e9739d8099f77ebdda5077ce355cb
|
||||
CustomElements.min.js: d2b3b891e3a2a1a3047e5db8e41ae82652ec52e3
|
||||
HTMLImports.js: 32245add3779590957ccbf9c19e3ef2501d23494
|
||||
HTMLImports.min.js: 1251df1bf40273de7d95ba876e17bec2622a6142
|
||||
MutationObserver.js: 07a06987c03c97373d2cc7e43516f6663429bb7d
|
||||
MutationObserver.min.js: d676e932810b6860e56510d70287861fa9385f9b
|
||||
ShadowDOM.js: ed246b4def742ce5b467c51cb803f9d4711a9054
|
||||
ShadowDOM.min.js: 2d8e43f97b7b4c037c59cef9103e86d4a6f9fe08
|
||||
webcomponents-lite.js: b5c1d7648c2d3f619dbae5ae0c3c5e66af91cfce
|
||||
webcomponents-lite.min.js: 8c229ac969864f1956a319590b3aa7f193ef8398
|
||||
webcomponents.js: f7af8f0b63dd15d1353e9e52dc85240923524359
|
||||
webcomponents.min.js: f1924b5dfb267b086b02036f3b76cce36e07bd71
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "webcomponents.js",
|
||||
"version": "0.7.7",
|
||||
"version": "0.7.8",
|
||||
"description": "webcomponents.js",
|
||||
"main": "webcomponents.js",
|
||||
"directories": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
@@ -1260,12 +1260,12 @@ window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
var isIE = scope.isIE;
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
|
||||
var importParser = {
|
||||
documentSelectors: IMPORT_SELECTOR,
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
map: {
|
||||
link: "parseLink",
|
||||
script: "parseScript",
|
||||
@@ -1316,6 +1316,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
elt.import = elt.__doc;
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
@@ -1378,6 +1379,8 @@ window.HTMLImports.addModule(function(scope) {
|
||||
trackElement: function(elt, callback) {
|
||||
var self = this;
|
||||
var done = function(e) {
|
||||
elt.removeEventListener("load", done);
|
||||
elt.removeEventListener("error", done);
|
||||
if (callback) {
|
||||
callback(e);
|
||||
}
|
||||
@@ -1386,7 +1389,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
};
|
||||
elt.addEventListener("load", done);
|
||||
elt.addEventListener("error", done);
|
||||
if (isIE && elt.localName === "style") {
|
||||
if (isIE11OrOlder && elt.localName === "style") {
|
||||
var fakeLoad = false;
|
||||
if (elt.textContent.indexOf("@import") == -1) {
|
||||
fakeLoad = true;
|
||||
@@ -1433,7 +1436,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
|
||||
if (!this.isParsed(n)) {
|
||||
if (this.hasResource(n)) {
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -1456,7 +1459,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
return this.dynamicElements.indexOf(elt) >= 0;
|
||||
},
|
||||
hasResource: function(node) {
|
||||
if (nodeIsImport(node) && node.import === undefined) {
|
||||
if (nodeIsImport(node) && node.__doc === undefined) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1530,7 +1533,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
this.documents[url] = doc;
|
||||
}
|
||||
elt.import = doc;
|
||||
elt.__doc = doc;
|
||||
}
|
||||
parser.parseNext();
|
||||
},
|
||||
@@ -1912,6 +1915,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
}
|
||||
scope.watchShadow = watchShadow;
|
||||
scope.upgradeDocumentTree = upgradeDocumentTree;
|
||||
scope.upgradeDocument = upgradeDocument;
|
||||
scope.upgradeSubtree = addedSubtree;
|
||||
scope.upgradeAll = addedNode;
|
||||
scope.attached = attached;
|
||||
@@ -1923,11 +1927,9 @@ window.CustomElements.addModule(function(scope) {
|
||||
function upgrade(node, isAttached) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
var is = node.getAttribute("is");
|
||||
var definition = scope.getRegisteredDefinition(is || node.localName);
|
||||
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
|
||||
if (definition) {
|
||||
if (is && definition.tag == node.localName) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
} else if (!is && !definition.extends) {
|
||||
if (is && definition.tag == node.localName || !is && !definition.extends) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
}
|
||||
}
|
||||
@@ -2221,6 +2223,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
initializeModules();
|
||||
}
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeDocument = scope.upgradeDocument;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
@@ -2231,13 +2234,15 @@ window.CustomElements.addModule(function(scope) {
|
||||
};
|
||||
}
|
||||
}
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
if (elt.import) {
|
||||
upgradeDocument(wrap(elt.import));
|
||||
}
|
||||
};
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(window.wrap(elt.import));
|
||||
};
|
||||
}
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
@@ -2279,6 +2284,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
if (typeof HTMLTemplateElement === "undefined") {
|
||||
(function() {
|
||||
var TEMPLATE_TAG = "template";
|
||||
var contentDoc = document.implementation.createHTMLDocument("template");
|
||||
HTMLTemplateElement = function() {};
|
||||
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
||||
HTMLTemplateElement.decorate = function(template) {
|
||||
@@ -2289,6 +2295,25 @@ if (typeof HTMLTemplateElement === "undefined") {
|
||||
while (child = template.firstChild) {
|
||||
template.content.appendChild(child);
|
||||
}
|
||||
Object.defineProperty(template, "innerHTML", {
|
||||
get: function() {
|
||||
var o = "";
|
||||
for (var e = this.content.firstChild; e; e = e.nextSibling) {
|
||||
o += e.outerHTML || escapeData(e.data);
|
||||
}
|
||||
return o;
|
||||
},
|
||||
set: function(text) {
|
||||
contentDoc.body.innerHTML = text;
|
||||
while (this.content.firstChild) {
|
||||
this.content.removeChild(this.content.firstChild);
|
||||
}
|
||||
while (contentDoc.body.firstChild) {
|
||||
this.content.appendChild(contentDoc.body.firstChild);
|
||||
}
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
};
|
||||
HTMLTemplateElement.bootstrap = function(doc) {
|
||||
var templates = doc.querySelectorAll(TEMPLATE_TAG);
|
||||
@@ -2308,6 +2333,25 @@ if (typeof HTMLTemplateElement === "undefined") {
|
||||
}
|
||||
return el;
|
||||
};
|
||||
var escapeDataRegExp = /[&\u00A0<>]/g;
|
||||
function escapeReplace(c) {
|
||||
switch (c) {
|
||||
case "&":
|
||||
return "&";
|
||||
|
||||
case "<":
|
||||
return "<";
|
||||
|
||||
case ">":
|
||||
return ">";
|
||||
|
||||
case " ":
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
function escapeData(s) {
|
||||
return s.replace(escapeDataRegExp, escapeReplace);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
7
webcomponents-lite.min.js
vendored
7
webcomponents-lite.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.7
|
||||
// @version 0.7.8
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
@@ -6029,12 +6029,12 @@ window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
var isIE = scope.isIE;
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
|
||||
var importParser = {
|
||||
documentSelectors: IMPORT_SELECTOR,
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
||||
map: {
|
||||
link: "parseLink",
|
||||
script: "parseScript",
|
||||
@@ -6085,6 +6085,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
elt.import = elt.__doc;
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
@@ -6147,6 +6148,8 @@ window.HTMLImports.addModule(function(scope) {
|
||||
trackElement: function(elt, callback) {
|
||||
var self = this;
|
||||
var done = function(e) {
|
||||
elt.removeEventListener("load", done);
|
||||
elt.removeEventListener("error", done);
|
||||
if (callback) {
|
||||
callback(e);
|
||||
}
|
||||
@@ -6155,7 +6158,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
};
|
||||
elt.addEventListener("load", done);
|
||||
elt.addEventListener("error", done);
|
||||
if (isIE && elt.localName === "style") {
|
||||
if (isIE11OrOlder && elt.localName === "style") {
|
||||
var fakeLoad = false;
|
||||
if (elt.textContent.indexOf("@import") == -1) {
|
||||
fakeLoad = true;
|
||||
@@ -6202,7 +6205,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
|
||||
if (!this.isParsed(n)) {
|
||||
if (this.hasResource(n)) {
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
|
||||
return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -6225,7 +6228,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
return this.dynamicElements.indexOf(elt) >= 0;
|
||||
},
|
||||
hasResource: function(node) {
|
||||
if (nodeIsImport(node) && node.import === undefined) {
|
||||
if (nodeIsImport(node) && node.__doc === undefined) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -6299,7 +6302,7 @@ window.HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
this.documents[url] = doc;
|
||||
}
|
||||
elt.import = doc;
|
||||
elt.__doc = doc;
|
||||
}
|
||||
parser.parseNext();
|
||||
},
|
||||
@@ -6681,6 +6684,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
}
|
||||
scope.watchShadow = watchShadow;
|
||||
scope.upgradeDocumentTree = upgradeDocumentTree;
|
||||
scope.upgradeDocument = upgradeDocument;
|
||||
scope.upgradeSubtree = addedSubtree;
|
||||
scope.upgradeAll = addedNode;
|
||||
scope.attached = attached;
|
||||
@@ -6692,11 +6696,9 @@ window.CustomElements.addModule(function(scope) {
|
||||
function upgrade(node, isAttached) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
var is = node.getAttribute("is");
|
||||
var definition = scope.getRegisteredDefinition(is || node.localName);
|
||||
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
|
||||
if (definition) {
|
||||
if (is && definition.tag == node.localName) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
} else if (!is && !definition.extends) {
|
||||
if (is && definition.tag == node.localName || !is && !definition.extends) {
|
||||
return upgradeWithDefinition(node, definition, isAttached);
|
||||
}
|
||||
}
|
||||
@@ -6990,6 +6992,7 @@ window.CustomElements.addModule(function(scope) {
|
||||
initializeModules();
|
||||
}
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeDocument = scope.upgradeDocument;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
@@ -7000,13 +7003,15 @@ window.CustomElements.addModule(function(scope) {
|
||||
};
|
||||
}
|
||||
}
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
if (elt.import) {
|
||||
upgradeDocument(wrap(elt.import));
|
||||
}
|
||||
};
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(window.wrap(elt.import));
|
||||
};
|
||||
}
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
@@ -7088,35 +7093,6 @@ window.CustomElements.addModule(function(scope) {
|
||||
};
|
||||
}();
|
||||
}
|
||||
var elementDeclarations = [];
|
||||
var polymerStub = function(name, dictionary) {
|
||||
if (typeof name !== "string" && arguments.length === 1) {
|
||||
Array.prototype.push.call(arguments, document._currentScript);
|
||||
}
|
||||
elementDeclarations.push(arguments);
|
||||
};
|
||||
window.Polymer = polymerStub;
|
||||
scope.consumeDeclarations = function(callback) {
|
||||
scope.consumeDeclarations = function() {
|
||||
throw "Possible attempt to load Polymer twice";
|
||||
};
|
||||
if (callback) {
|
||||
callback(elementDeclarations);
|
||||
}
|
||||
elementDeclarations = null;
|
||||
};
|
||||
function installPolymerWarning() {
|
||||
if (window.Polymer === polymerStub) {
|
||||
window.Polymer = function() {
|
||||
throw new Error("You tried to use polymer without loading it first. To " + 'load polymer, <link rel="import" href="' + 'components/polymer/polymer.html">');
|
||||
};
|
||||
}
|
||||
}
|
||||
if (HTMLImports.useNative) {
|
||||
installPolymerWarning();
|
||||
} else {
|
||||
window.addEventListener("DOMContentLoaded", installPolymerWarning);
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
(function(scope) {
|
||||
|
||||
6
webcomponents.min.js
vendored
6
webcomponents.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user