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-08-20 23:27:11 -04:00
parent ec5a50ea20
commit 6744d8dbe8
20 changed files with 152 additions and 131 deletions

View file

@ -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.11
// @version 0.7.12
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
@ -341,7 +341,7 @@ if (typeof WeakMap === "undefined") {
};
global.JsMutationObserver = JsMutationObserver;
if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
})(this);
})(window);
window.CustomElements = window.CustomElements || {
flags: {}
@ -361,6 +361,7 @@ window.CustomElements = window.CustomElements || {
scope.addModule = addModule;
scope.initializeModules = initializeModules;
scope.hasNative = Boolean(document.registerElement);
scope.isIE = /Trident/.test(navigator.userAgent);
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
})(window.CustomElements);
@ -669,7 +670,7 @@ window.CustomElements.addModule(function(scope) {
});
window.CustomElements.addModule(function(scope) {
var isIE11OrOlder = scope.isIE11OrOlder;
var isIE = scope.isIE;
var upgradeDocumentTree = scope.upgradeDocumentTree;
var upgradeAll = scope.upgradeAll;
var upgradeWithDefinition = scope.upgradeWithDefinition;
@ -865,7 +866,7 @@ window.CustomElements.addModule(function(scope) {
}
wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
wrapDomMethodToForceUpgrade(document, "importNode");
if (isIE11OrOlder) {
if (isIE) {
(function() {
var importNode = document.importNode;
document.importNode = function() {
@ -893,7 +894,7 @@ window.CustomElements.addModule(function(scope) {
(function(scope) {
var useNative = scope.useNative;
var initializeModules = scope.initializeModules;
var isIE11OrOlder = /Trident/.test(navigator.userAgent);
var isIE = scope.isIE;
if (useNative) {
var nop = function() {};
scope.watchShadow = nop;
@ -930,6 +931,9 @@ window.CustomElements.addModule(function(scope) {
function bootstrap() {
upgradeDocumentTree(window.wrap(document));
window.CustomElements.ready = true;
var requestAnimationFrame = window.requestAnimationFrame || function(f) {
setTimeout(f, 16);
};
requestAnimationFrame(function() {
setTimeout(function() {
window.CustomElements.readyTime = Date.now();
@ -942,7 +946,7 @@ window.CustomElements.addModule(function(scope) {
});
});
}
if (isIE11OrOlder && typeof window.CustomEvent !== "function") {
if (isIE && typeof window.CustomEvent !== "function") {
window.CustomEvent = function(inType, params) {
params = params || {};
var e = document.createEvent("CustomEvent");
@ -966,5 +970,4 @@ window.CustomElements.addModule(function(scope) {
var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
window.addEventListener(loadEvent, bootstrap);
}
scope.isIE11OrOlder = isIE11OrOlder;
})(window.CustomElements);