mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
231cb007b1
commit
0b450116a5
22 changed files with 141 additions and 108 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue