1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update polymer

This commit is contained in:
Luke Pulverenti 2015-10-27 10:58:38 -04:00
parent 6825ae319e
commit 2d53ff29c5
106 changed files with 3070 additions and 1567 deletions

View file

@ -7,13 +7,14 @@
* 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.14
window.WebComponents = window.WebComponents || {};
(function(scope) {
var flags = scope.flags || {};
// @version 0.7.15
(function() {
window.WebComponents = window.WebComponents || {
flags: {}
};
var file = "webcomponents-lite.js";
var script = document.querySelector('script[src*="' + file + '"]');
var flags = {};
if (!flags.noOpts) {
location.search.slice(1).split("&").forEach(function(option) {
var parts = option.split("=");
@ -29,7 +30,7 @@ window.WebComponents = window.WebComponents || {};
}
}
}
if (flags.log) {
if (flags.log && flags.log.split) {
var parts = flags.log.split(",");
flags.log = {};
parts.forEach(function(f) {
@ -39,20 +40,14 @@ window.WebComponents = window.WebComponents || {};
flags.log = {};
}
}
flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;
if (flags.shadow === "native") {
flags.shadow = false;
} else {
flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;
}
if (flags.register) {
window.CustomElements = window.CustomElements || {
flags: {}
};
window.CustomElements.flags.register = flags.register;
}
scope.flags = flags;
})(window.WebComponents);
WebComponents.flags = flags;
})();
(function(scope) {
"use strict";
@ -613,6 +608,9 @@ if (typeof WeakMap === "undefined") {
}
(function(global) {
if (global.JsMutationObserver) {
return;
}
var registrationsTable = new WeakMap();
var setImmediate;
if (/Trident|Edge/.test(navigator.userAgent)) {
@ -908,7 +906,10 @@ if (typeof WeakMap === "undefined") {
}
};
global.JsMutationObserver = JsMutationObserver;
if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
if (!global.MutationObserver) {
global.MutationObserver = JsMutationObserver;
JsMutationObserver._isPolyfilled = true;
}
})(self);
window.HTMLImports = window.HTMLImports || {
@ -1756,8 +1757,9 @@ window.CustomElements.addModule(function(scope) {
}
});
}
var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
scope.hasPolyfillMutations = hasPolyfillMutations;
var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
scope.hasPolyfillMutations = hasThrottledAttached;
scope.hasThrottledAttached = hasThrottledAttached;
var isPendingMutations = false;
var pendingMutations = [];
function deferMutation(fn) {
@ -1776,7 +1778,7 @@ window.CustomElements.addModule(function(scope) {
pendingMutations = [];
}
function attached(element) {
if (hasPolyfillMutations) {
if (hasThrottledAttached) {
deferMutation(function() {
_attached(element);
});
@ -1799,7 +1801,7 @@ window.CustomElements.addModule(function(scope) {
});
}
function detached(element) {
if (hasPolyfillMutations) {
if (hasThrottledAttached) {
deferMutation(function() {
_detached(element);
});