mirror of
https://github.com/loot/loot.github.io.git
synced 2026-07-27 14:13:30 -07:00
Update Bower dependencies.
Updated Web Components and the Vulcanized Polymer loader file.
This commit is contained in:
+1
-1
@@ -24,6 +24,6 @@
|
||||
"octokat": "~0.4.10"
|
||||
},
|
||||
"resolutions": {
|
||||
"webcomponentsjs": "0.7.2"
|
||||
"webcomponentsjs": "0.7.5"
|
||||
}
|
||||
}
|
||||
|
||||
+8
-4
@@ -1,21 +1,25 @@
|
||||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.5",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webcomponents/webcomponentsjs.git"
|
||||
},
|
||||
"keywords": [
|
||||
"webcomponents"
|
||||
],
|
||||
"license": "BSD",
|
||||
"ignore": [],
|
||||
"_release": "0.7.2",
|
||||
"_release": "0.7.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.7.2",
|
||||
"commit": "ae4e2d728f3da846541caa40dbaa881100e464d2"
|
||||
"tag": "v0.7.5",
|
||||
"commit": "6e2fd746392a9fbec95711872e21fa22bff22fae"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/webcomponentsjs.git",
|
||||
"_target": "*",
|
||||
|
||||
+28
-21
@@ -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.2
|
||||
// @version 0.7.5
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
@@ -361,11 +361,11 @@ window.CustomElements = window.CustomElements || {
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
scope.hasNative = Boolean(document.registerElement);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
|
||||
})(CustomElements);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
|
||||
})(window.CustomElements);
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
function forSubtree(node, cb) {
|
||||
findAllElements(node, function(e) {
|
||||
if (cb(e)) {
|
||||
@@ -402,7 +402,7 @@ CustomElements.addModule(function(scope) {
|
||||
_forDocumentTree(doc, cb, []);
|
||||
}
|
||||
function _forDocumentTree(doc, cb, processingDocuments) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
if (processingDocuments.indexOf(doc) >= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -419,7 +419,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.forSubtree = forSubtree;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var forSubtree = scope.forSubtree;
|
||||
var forDocumentTree = scope.forDocumentTree;
|
||||
@@ -564,9 +564,9 @@ CustomElements.addModule(function(scope) {
|
||||
flags.dom && console.groupEnd();
|
||||
}
|
||||
function takeRecords(node) {
|
||||
node = wrap(node);
|
||||
node = window.wrap(node);
|
||||
if (!node) {
|
||||
node = wrap(document);
|
||||
node = window.wrap(document);
|
||||
}
|
||||
while (node.parentNode) {
|
||||
node = node.parentNode;
|
||||
@@ -590,7 +590,7 @@ CustomElements.addModule(function(scope) {
|
||||
inRoot.__observer = observer;
|
||||
}
|
||||
function upgradeDocument(doc) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
|
||||
addedNode(doc);
|
||||
observe(doc);
|
||||
@@ -603,7 +603,7 @@ CustomElements.addModule(function(scope) {
|
||||
if (originalCreateShadowRoot) {
|
||||
Element.prototype.createShadowRoot = function() {
|
||||
var root = originalCreateShadowRoot.call(this);
|
||||
CustomElements.watchShadow(this);
|
||||
window.CustomElements.watchShadow(this);
|
||||
return root;
|
||||
};
|
||||
}
|
||||
@@ -615,7 +615,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.takeRecords = takeRecords;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
function upgrade(node) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
@@ -675,7 +675,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.implementPrototype = implementPrototype;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeAll = scope.upgradeAll;
|
||||
@@ -909,8 +909,8 @@ CustomElements.addModule(function(scope) {
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
} else {
|
||||
window.wrap = window.unwrap = function(node) {
|
||||
return node;
|
||||
@@ -918,17 +918,17 @@ CustomElements.addModule(function(scope) {
|
||||
}
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(wrap(document));
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
HTMLImports.__importsParsingHook = function(elt) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(wrap(elt.import));
|
||||
};
|
||||
}
|
||||
CustomElements.ready = true;
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
CustomElements.readyTime = Date.now();
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
if (window.HTMLImports) {
|
||||
CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
|
||||
window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
|
||||
}
|
||||
document.dispatchEvent(new CustomEvent("WebComponentsReady", {
|
||||
bubbles: true
|
||||
@@ -940,6 +940,13 @@ CustomElements.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -949,7 +956,7 @@ CustomElements.addModule(function(scope) {
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
bootstrap();
|
||||
} else {
|
||||
var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
window.addEventListener(loadEvent, bootstrap);
|
||||
}
|
||||
scope.isIE11OrOlder = isIE11OrOlder;
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+26
-19
@@ -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.2
|
||||
// @version 0.7.5
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
@@ -352,19 +352,19 @@ window.HTMLImports = window.HTMLImports || {
|
||||
var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
|
||||
var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
|
||||
var wrap = function(node) {
|
||||
return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
};
|
||||
var rootDocument = wrap(document);
|
||||
var currentScriptDescriptor = {
|
||||
get: function() {
|
||||
var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
return wrap(script);
|
||||
},
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
|
||||
Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
|
||||
var isIE = /Trident|Edge/.test(navigator.userAgent);
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
function whenReady(callback, doc) {
|
||||
doc = doc || rootDocument;
|
||||
whenDocumentReady(function() {
|
||||
@@ -473,8 +473,8 @@ window.HTMLImports = window.HTMLImports || {
|
||||
})();
|
||||
}
|
||||
whenReady(function(detail) {
|
||||
HTMLImports.ready = true;
|
||||
HTMLImports.readyTime = new Date().getTime();
|
||||
window.HTMLImports.ready = true;
|
||||
window.HTMLImports.readyTime = new Date().getTime();
|
||||
var evt = rootDocument.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
|
||||
rootDocument.dispatchEvent(evt);
|
||||
@@ -484,7 +484,7 @@ window.HTMLImports = window.HTMLImports || {
|
||||
scope.rootDocument = rootDocument;
|
||||
scope.whenReady = whenReady;
|
||||
scope.isIE = isIE;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
(function(scope) {
|
||||
var modules = [];
|
||||
@@ -498,9 +498,9 @@ window.HTMLImports = window.HTMLImports || {
|
||||
};
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
|
||||
var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
|
||||
var path = {
|
||||
@@ -530,7 +530,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.path = path;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = {
|
||||
async: true,
|
||||
ok: function(request) {
|
||||
@@ -562,7 +562,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.xhr = xhr;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = scope.xhr;
|
||||
var flags = scope.flags;
|
||||
var Loader = function(onLoad, onComplete) {
|
||||
@@ -655,7 +655,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Loader = Loader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var Observer = function(addCallback) {
|
||||
this.addCallback = addCallback;
|
||||
this.mo = new MutationObserver(this.handler.bind(this));
|
||||
@@ -688,7 +688,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Observer = Observer;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
@@ -748,8 +748,8 @@ HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
if (HTMLImports.__importsParsingHook) {
|
||||
HTMLImports.__importsParsingHook(elt);
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
if (elt.import) {
|
||||
elt.import.__importParsed = true;
|
||||
@@ -920,7 +920,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
|
||||
@@ -1019,7 +1019,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.importLoader = importLoader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var parser = scope.parser;
|
||||
var importer = scope.importer;
|
||||
var dynamic = {
|
||||
@@ -1061,6 +1061,13 @@ HTMLImports.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -1068,11 +1075,11 @@ HTMLImports.addModule(function(scope) {
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
HTMLImports.importer.bootDocument(rootDocument);
|
||||
window.HTMLImports.importer.bootDocument(rootDocument);
|
||||
}
|
||||
if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
|
||||
bootstrap();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", bootstrap);
|
||||
}
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -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.2
|
||||
// @version 0.7.5
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+12
-6
@@ -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.2
|
||||
// @version 0.7.5
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
@@ -113,7 +113,7 @@ window.ShadowDOMPolyfill = {};
|
||||
defineProperty(object, name, nonEnumerableDataDescriptor);
|
||||
}
|
||||
getOwnPropertyNames(window);
|
||||
function getWrapperConstructor(node) {
|
||||
function getWrapperConstructor(node, opt_instance) {
|
||||
var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
|
||||
if (isFirefox) {
|
||||
try {
|
||||
@@ -126,7 +126,7 @@ window.ShadowDOMPolyfill = {};
|
||||
if (wrapperConstructor) return wrapperConstructor;
|
||||
var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
|
||||
var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
|
||||
registerInternal(nativePrototype, GeneratedWrapper, node);
|
||||
registerInternal(nativePrototype, GeneratedWrapper, opt_instance);
|
||||
return GeneratedWrapper;
|
||||
}
|
||||
function addForwardingProperties(nativePrototype, wrapperPrototype) {
|
||||
@@ -186,8 +186,10 @@ window.ShadowDOMPolyfill = {};
|
||||
}
|
||||
var descriptor = getDescriptor(source, name);
|
||||
var getter, setter;
|
||||
if (allowMethod && typeof descriptor.value === "function") {
|
||||
target[name] = getMethod(name);
|
||||
if (typeof descriptor.value === "function") {
|
||||
if (allowMethod) {
|
||||
target[name] = getMethod(name);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
var isEvent = isEventHandlerName(name);
|
||||
@@ -250,7 +252,11 @@ window.ShadowDOMPolyfill = {};
|
||||
function wrap(impl) {
|
||||
if (impl === null) return null;
|
||||
assert(isNative(impl));
|
||||
return impl.__wrapper8e3dd93a60__ || (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));
|
||||
var wrapper = impl.__wrapper8e3dd93a60__;
|
||||
if (wrapper != null) {
|
||||
return wrapper;
|
||||
}
|
||||
return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);
|
||||
}
|
||||
function unwrap(wrapper) {
|
||||
if (wrapper === null) return null;
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+5
-1
@@ -1,11 +1,15 @@
|
||||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.5",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webcomponents/webcomponentsjs.git"
|
||||
},
|
||||
"keywords": [
|
||||
"webcomponents"
|
||||
],
|
||||
|
||||
+18
-18
@@ -1,33 +1,33 @@
|
||||
BUILD LOG
|
||||
---------
|
||||
Build Time: 2015-05-26T17:48:07-0700
|
||||
Build Time: 2015-06-17T19:01:18-0700
|
||||
|
||||
NODEJS INFORMATION
|
||||
==================
|
||||
nodejs: v2.0.2
|
||||
gulp: 3.8.11
|
||||
nodejs: v2.3.0
|
||||
gulp: 3.9.0
|
||||
gulp-audit: 1.0.0
|
||||
gulp-concat: 2.5.2
|
||||
gulp-header: 1.2.2
|
||||
run-sequence: 1.1.0
|
||||
web-component-tester: 3.1.3
|
||||
gulp-uglify: 1.2.0
|
||||
run-sequence: 1.1.1
|
||||
web-component-tester: 3.2.0
|
||||
|
||||
REPO REVISIONS
|
||||
==============
|
||||
webcomponentsjs: 131ea2174ec5c4d4a48e6637cc0751dc5dee43a3
|
||||
webcomponentsjs: 1ee61faca40f109f2f5b6ddc8fa15de0319a6e61
|
||||
|
||||
BUILD HASHES
|
||||
============
|
||||
CustomElements.js: 62dbb3db0856c43bb43a90c1f9ac400cb568d2e2
|
||||
CustomElements.min.js: 482d41c9b901e21b8be5dde1f334579bea9b3278
|
||||
HTMLImports.js: 6aa44b4dbe224ba04011308ffcfc7bac4d2ecf45
|
||||
HTMLImports.min.js: ac0190e185cf6a3fcd9b092b2143b8796c2b2db7
|
||||
MutationObserver.js: 6d07c7fab2a59b4d3face7bf3b61474514d506ec
|
||||
MutationObserver.min.js: 3e3ec659c0b2c27d5717f2155507d76f06abf103
|
||||
ShadowDOM.js: aeb06cb34b92f5fd5f91e169a8545043a4c06e4e
|
||||
ShadowDOM.min.js: a615e963dfa831edadd0457327a7c3818693e19c
|
||||
webcomponents-lite.js: 5ebee320c939e16c7747d354a7b59c5eaf6372b3
|
||||
webcomponents-lite.min.js: 3c4c323b2584c009791a41a351491f610e2cc253
|
||||
webcomponents.js: a028071aec0b77be6f1c562552f199ea57f73869
|
||||
webcomponents.min.js: 57b88a10558b60e24f309ff6dc914d9100977895
|
||||
CustomElements.js: f3f0c7f3c65aeb5cc56c64300fe89003a4c7fa31
|
||||
CustomElements.min.js: 557ccd338ab463c9bcd1e3c0fc4102455432214a
|
||||
HTMLImports.js: 8c1f33a777d7ff8ee3a22fce8d35e5b927285724
|
||||
HTMLImports.min.js: f4ba44076c40f408c661caa8baf81f9e3740689b
|
||||
MutationObserver.js: 81934731acd4175701d678dbef11aaefa7d701f5
|
||||
MutationObserver.min.js: 6202537174240ba28bf71e22cddf90ce80cf73f8
|
||||
ShadowDOM.js: 5e901cfe7eb384f15a39b1bf4e510a06ae03b43e
|
||||
ShadowDOM.min.js: 397715836fdd0cfe15a5e966f5ab187ccc1bec15
|
||||
webcomponents-lite.js: 5c38f87a645eea9d282de74340c101e5531cb2c0
|
||||
webcomponents-lite.min.js: 2a744443fbfba6b30fde7b17606f68cae6036e52
|
||||
webcomponents.js: 637cf33c1ee108fb376891eed0b5b47deed8c238
|
||||
webcomponents.min.js: c2841b948265560478872747618cad207a693c4f
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "webcomponents.js",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.5",
|
||||
"description": "webcomponents.js",
|
||||
"main": "webcomponents.js",
|
||||
"directories": {
|
||||
|
||||
+56
-42
@@ -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.2
|
||||
// @version 0.7.5
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
@@ -52,7 +52,7 @@ window.WebComponents = window.WebComponents || {};
|
||||
window.CustomElements.flags.register = flags.register;
|
||||
}
|
||||
scope.flags = flags;
|
||||
})(WebComponents);
|
||||
})(window.WebComponents);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
@@ -164,7 +164,7 @@ window.WebComponents = window.WebComponents || {};
|
||||
|
||||
case "scheme data":
|
||||
if ("?" == c) {
|
||||
query = "?";
|
||||
this._query = "?";
|
||||
state = "query";
|
||||
} else if ("#" == c) {
|
||||
this._fragment = "#";
|
||||
@@ -920,19 +920,19 @@ window.HTMLImports = window.HTMLImports || {
|
||||
var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
|
||||
var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
|
||||
var wrap = function(node) {
|
||||
return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
};
|
||||
var rootDocument = wrap(document);
|
||||
var currentScriptDescriptor = {
|
||||
get: function() {
|
||||
var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
return wrap(script);
|
||||
},
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
|
||||
Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
|
||||
var isIE = /Trident|Edge/.test(navigator.userAgent);
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
function whenReady(callback, doc) {
|
||||
doc = doc || rootDocument;
|
||||
whenDocumentReady(function() {
|
||||
@@ -1041,8 +1041,8 @@ window.HTMLImports = window.HTMLImports || {
|
||||
})();
|
||||
}
|
||||
whenReady(function(detail) {
|
||||
HTMLImports.ready = true;
|
||||
HTMLImports.readyTime = new Date().getTime();
|
||||
window.HTMLImports.ready = true;
|
||||
window.HTMLImports.readyTime = new Date().getTime();
|
||||
var evt = rootDocument.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
|
||||
rootDocument.dispatchEvent(evt);
|
||||
@@ -1052,7 +1052,7 @@ window.HTMLImports = window.HTMLImports || {
|
||||
scope.rootDocument = rootDocument;
|
||||
scope.whenReady = whenReady;
|
||||
scope.isIE = isIE;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
(function(scope) {
|
||||
var modules = [];
|
||||
@@ -1066,9 +1066,9 @@ window.HTMLImports = window.HTMLImports || {
|
||||
};
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
|
||||
var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
|
||||
var path = {
|
||||
@@ -1098,7 +1098,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.path = path;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = {
|
||||
async: true,
|
||||
ok: function(request) {
|
||||
@@ -1130,7 +1130,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.xhr = xhr;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = scope.xhr;
|
||||
var flags = scope.flags;
|
||||
var Loader = function(onLoad, onComplete) {
|
||||
@@ -1223,7 +1223,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Loader = Loader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var Observer = function(addCallback) {
|
||||
this.addCallback = addCallback;
|
||||
this.mo = new MutationObserver(this.handler.bind(this));
|
||||
@@ -1256,7 +1256,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Observer = Observer;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
@@ -1316,8 +1316,8 @@ HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
if (HTMLImports.__importsParsingHook) {
|
||||
HTMLImports.__importsParsingHook(elt);
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
if (elt.import) {
|
||||
elt.import.__importParsed = true;
|
||||
@@ -1488,7 +1488,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
|
||||
@@ -1587,7 +1587,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.importLoader = importLoader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var parser = scope.parser;
|
||||
var importer = scope.importer;
|
||||
var dynamic = {
|
||||
@@ -1629,6 +1629,13 @@ HTMLImports.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -1636,14 +1643,14 @@ HTMLImports.addModule(function(scope) {
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
HTMLImports.importer.bootDocument(rootDocument);
|
||||
window.HTMLImports.importer.bootDocument(rootDocument);
|
||||
}
|
||||
if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
|
||||
bootstrap();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", bootstrap);
|
||||
}
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
window.CustomElements = window.CustomElements || {
|
||||
flags: {}
|
||||
@@ -1663,11 +1670,11 @@ window.CustomElements = window.CustomElements || {
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
scope.hasNative = Boolean(document.registerElement);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
|
||||
})(CustomElements);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
|
||||
})(window.CustomElements);
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
function forSubtree(node, cb) {
|
||||
findAllElements(node, function(e) {
|
||||
if (cb(e)) {
|
||||
@@ -1704,7 +1711,7 @@ CustomElements.addModule(function(scope) {
|
||||
_forDocumentTree(doc, cb, []);
|
||||
}
|
||||
function _forDocumentTree(doc, cb, processingDocuments) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
if (processingDocuments.indexOf(doc) >= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -1721,7 +1728,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.forSubtree = forSubtree;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var forSubtree = scope.forSubtree;
|
||||
var forDocumentTree = scope.forDocumentTree;
|
||||
@@ -1866,9 +1873,9 @@ CustomElements.addModule(function(scope) {
|
||||
flags.dom && console.groupEnd();
|
||||
}
|
||||
function takeRecords(node) {
|
||||
node = wrap(node);
|
||||
node = window.wrap(node);
|
||||
if (!node) {
|
||||
node = wrap(document);
|
||||
node = window.wrap(document);
|
||||
}
|
||||
while (node.parentNode) {
|
||||
node = node.parentNode;
|
||||
@@ -1892,7 +1899,7 @@ CustomElements.addModule(function(scope) {
|
||||
inRoot.__observer = observer;
|
||||
}
|
||||
function upgradeDocument(doc) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
|
||||
addedNode(doc);
|
||||
observe(doc);
|
||||
@@ -1905,7 +1912,7 @@ CustomElements.addModule(function(scope) {
|
||||
if (originalCreateShadowRoot) {
|
||||
Element.prototype.createShadowRoot = function() {
|
||||
var root = originalCreateShadowRoot.call(this);
|
||||
CustomElements.watchShadow(this);
|
||||
window.CustomElements.watchShadow(this);
|
||||
return root;
|
||||
};
|
||||
}
|
||||
@@ -1917,7 +1924,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.takeRecords = takeRecords;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
function upgrade(node) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
@@ -1977,7 +1984,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.implementPrototype = implementPrototype;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeAll = scope.upgradeAll;
|
||||
@@ -2211,8 +2218,8 @@ CustomElements.addModule(function(scope) {
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
} else {
|
||||
window.wrap = window.unwrap = function(node) {
|
||||
return node;
|
||||
@@ -2220,17 +2227,17 @@ CustomElements.addModule(function(scope) {
|
||||
}
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(wrap(document));
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
HTMLImports.__importsParsingHook = function(elt) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(wrap(elt.import));
|
||||
};
|
||||
}
|
||||
CustomElements.ready = true;
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
CustomElements.readyTime = Date.now();
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
if (window.HTMLImports) {
|
||||
CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
|
||||
window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
|
||||
}
|
||||
document.dispatchEvent(new CustomEvent("WebComponentsReady", {
|
||||
bubbles: true
|
||||
@@ -2242,6 +2249,13 @@ CustomElements.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -2251,7 +2265,7 @@ CustomElements.addModule(function(scope) {
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
bootstrap();
|
||||
} else {
|
||||
var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
window.addEventListener(loadEvent, bootstrap);
|
||||
}
|
||||
scope.isIE11OrOlder = isIE11OrOlder;
|
||||
@@ -2277,7 +2291,7 @@ if (typeof HTMLTemplateElement === "undefined") {
|
||||
HTMLTemplateElement.decorate(t);
|
||||
}
|
||||
};
|
||||
addEventListener("DOMContentLoaded", function() {
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
HTMLTemplateElement.bootstrap(document);
|
||||
});
|
||||
var createElement = document.createElement;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+66
-46
@@ -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.2
|
||||
// @version 0.7.5
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
@@ -158,7 +158,7 @@ if (WebComponents.flags.shadow) {
|
||||
defineProperty(object, name, nonEnumerableDataDescriptor);
|
||||
}
|
||||
getOwnPropertyNames(window);
|
||||
function getWrapperConstructor(node) {
|
||||
function getWrapperConstructor(node, opt_instance) {
|
||||
var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
|
||||
if (isFirefox) {
|
||||
try {
|
||||
@@ -171,7 +171,7 @@ if (WebComponents.flags.shadow) {
|
||||
if (wrapperConstructor) return wrapperConstructor;
|
||||
var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
|
||||
var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
|
||||
registerInternal(nativePrototype, GeneratedWrapper, node);
|
||||
registerInternal(nativePrototype, GeneratedWrapper, opt_instance);
|
||||
return GeneratedWrapper;
|
||||
}
|
||||
function addForwardingProperties(nativePrototype, wrapperPrototype) {
|
||||
@@ -231,8 +231,10 @@ if (WebComponents.flags.shadow) {
|
||||
}
|
||||
var descriptor = getDescriptor(source, name);
|
||||
var getter, setter;
|
||||
if (allowMethod && typeof descriptor.value === "function") {
|
||||
target[name] = getMethod(name);
|
||||
if (typeof descriptor.value === "function") {
|
||||
if (allowMethod) {
|
||||
target[name] = getMethod(name);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
var isEvent = isEventHandlerName(name);
|
||||
@@ -295,7 +297,11 @@ if (WebComponents.flags.shadow) {
|
||||
function wrap(impl) {
|
||||
if (impl === null) return null;
|
||||
assert(isNative(impl));
|
||||
return impl.__wrapper8e3dd93a60__ || (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));
|
||||
var wrapper = impl.__wrapper8e3dd93a60__;
|
||||
if (wrapper != null) {
|
||||
return wrapper;
|
||||
}
|
||||
return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);
|
||||
}
|
||||
function unwrap(wrapper) {
|
||||
if (wrapper === null) return null;
|
||||
@@ -4963,7 +4969,7 @@ if (WebComponents.flags.shadow) {
|
||||
|
||||
case "scheme data":
|
||||
if ("?" == c) {
|
||||
query = "?";
|
||||
this._query = "?";
|
||||
state = "query";
|
||||
} else if ("#" == c) {
|
||||
this._fragment = "#";
|
||||
@@ -5683,19 +5689,19 @@ window.HTMLImports = window.HTMLImports || {
|
||||
var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
|
||||
var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
|
||||
var wrap = function(node) {
|
||||
return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
|
||||
};
|
||||
var rootDocument = wrap(document);
|
||||
var currentScriptDescriptor = {
|
||||
get: function() {
|
||||
var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
|
||||
return wrap(script);
|
||||
},
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
|
||||
Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
|
||||
var isIE = /Trident|Edge/.test(navigator.userAgent);
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
function whenReady(callback, doc) {
|
||||
doc = doc || rootDocument;
|
||||
whenDocumentReady(function() {
|
||||
@@ -5804,8 +5810,8 @@ window.HTMLImports = window.HTMLImports || {
|
||||
})();
|
||||
}
|
||||
whenReady(function(detail) {
|
||||
HTMLImports.ready = true;
|
||||
HTMLImports.readyTime = new Date().getTime();
|
||||
window.HTMLImports.ready = true;
|
||||
window.HTMLImports.readyTime = new Date().getTime();
|
||||
var evt = rootDocument.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
|
||||
rootDocument.dispatchEvent(evt);
|
||||
@@ -5815,7 +5821,7 @@ window.HTMLImports = window.HTMLImports || {
|
||||
scope.rootDocument = rootDocument;
|
||||
scope.whenReady = whenReady;
|
||||
scope.isIE = isIE;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
(function(scope) {
|
||||
var modules = [];
|
||||
@@ -5829,9 +5835,9 @@ window.HTMLImports = window.HTMLImports || {
|
||||
};
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
|
||||
var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
|
||||
var path = {
|
||||
@@ -5861,7 +5867,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.path = path;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = {
|
||||
async: true,
|
||||
ok: function(request) {
|
||||
@@ -5893,7 +5899,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.xhr = xhr;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var xhr = scope.xhr;
|
||||
var flags = scope.flags;
|
||||
var Loader = function(onLoad, onComplete) {
|
||||
@@ -5986,7 +5992,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Loader = Loader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var Observer = function(addCallback) {
|
||||
this.addCallback = addCallback;
|
||||
this.mo = new MutationObserver(this.handler.bind(this));
|
||||
@@ -6019,7 +6025,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.Observer = Observer;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var path = scope.path;
|
||||
var rootDocument = scope.rootDocument;
|
||||
var flags = scope.flags;
|
||||
@@ -6079,8 +6085,8 @@ HTMLImports.addModule(function(scope) {
|
||||
}
|
||||
},
|
||||
parseImport: function(elt) {
|
||||
if (HTMLImports.__importsParsingHook) {
|
||||
HTMLImports.__importsParsingHook(elt);
|
||||
if (window.HTMLImports.__importsParsingHook) {
|
||||
window.HTMLImports.__importsParsingHook(elt);
|
||||
}
|
||||
if (elt.import) {
|
||||
elt.import.__importParsed = true;
|
||||
@@ -6251,7 +6257,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
||||
var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
|
||||
@@ -6350,7 +6356,7 @@ HTMLImports.addModule(function(scope) {
|
||||
scope.importLoader = importLoader;
|
||||
});
|
||||
|
||||
HTMLImports.addModule(function(scope) {
|
||||
window.HTMLImports.addModule(function(scope) {
|
||||
var parser = scope.parser;
|
||||
var importer = scope.importer;
|
||||
var dynamic = {
|
||||
@@ -6392,6 +6398,13 @@ HTMLImports.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -6399,14 +6412,14 @@ HTMLImports.addModule(function(scope) {
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
HTMLImports.importer.bootDocument(rootDocument);
|
||||
window.HTMLImports.importer.bootDocument(rootDocument);
|
||||
}
|
||||
if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
|
||||
bootstrap();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", bootstrap);
|
||||
}
|
||||
})(HTMLImports);
|
||||
})(window.HTMLImports);
|
||||
|
||||
window.CustomElements = window.CustomElements || {
|
||||
flags: {}
|
||||
@@ -6426,11 +6439,11 @@ window.CustomElements = window.CustomElements || {
|
||||
scope.addModule = addModule;
|
||||
scope.initializeModules = initializeModules;
|
||||
scope.hasNative = Boolean(document.registerElement);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
|
||||
})(CustomElements);
|
||||
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
|
||||
})(window.CustomElements);
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
|
||||
function forSubtree(node, cb) {
|
||||
findAllElements(node, function(e) {
|
||||
if (cb(e)) {
|
||||
@@ -6467,7 +6480,7 @@ CustomElements.addModule(function(scope) {
|
||||
_forDocumentTree(doc, cb, []);
|
||||
}
|
||||
function _forDocumentTree(doc, cb, processingDocuments) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
if (processingDocuments.indexOf(doc) >= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -6484,7 +6497,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.forSubtree = forSubtree;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
var forSubtree = scope.forSubtree;
|
||||
var forDocumentTree = scope.forDocumentTree;
|
||||
@@ -6629,9 +6642,9 @@ CustomElements.addModule(function(scope) {
|
||||
flags.dom && console.groupEnd();
|
||||
}
|
||||
function takeRecords(node) {
|
||||
node = wrap(node);
|
||||
node = window.wrap(node);
|
||||
if (!node) {
|
||||
node = wrap(document);
|
||||
node = window.wrap(document);
|
||||
}
|
||||
while (node.parentNode) {
|
||||
node = node.parentNode;
|
||||
@@ -6655,7 +6668,7 @@ CustomElements.addModule(function(scope) {
|
||||
inRoot.__observer = observer;
|
||||
}
|
||||
function upgradeDocument(doc) {
|
||||
doc = wrap(doc);
|
||||
doc = window.wrap(doc);
|
||||
flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
|
||||
addedNode(doc);
|
||||
observe(doc);
|
||||
@@ -6668,7 +6681,7 @@ CustomElements.addModule(function(scope) {
|
||||
if (originalCreateShadowRoot) {
|
||||
Element.prototype.createShadowRoot = function() {
|
||||
var root = originalCreateShadowRoot.call(this);
|
||||
CustomElements.watchShadow(this);
|
||||
window.CustomElements.watchShadow(this);
|
||||
return root;
|
||||
};
|
||||
}
|
||||
@@ -6680,7 +6693,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.takeRecords = takeRecords;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var flags = scope.flags;
|
||||
function upgrade(node) {
|
||||
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
||||
@@ -6740,7 +6753,7 @@ CustomElements.addModule(function(scope) {
|
||||
scope.implementPrototype = implementPrototype;
|
||||
});
|
||||
|
||||
CustomElements.addModule(function(scope) {
|
||||
window.CustomElements.addModule(function(scope) {
|
||||
var isIE11OrOlder = scope.isIE11OrOlder;
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
var upgradeAll = scope.upgradeAll;
|
||||
@@ -6974,8 +6987,8 @@ CustomElements.addModule(function(scope) {
|
||||
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
||||
if (!window.wrap) {
|
||||
if (window.ShadowDOMPolyfill) {
|
||||
window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
|
||||
window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
|
||||
} else {
|
||||
window.wrap = window.unwrap = function(node) {
|
||||
return node;
|
||||
@@ -6983,17 +6996,17 @@ CustomElements.addModule(function(scope) {
|
||||
}
|
||||
}
|
||||
function bootstrap() {
|
||||
upgradeDocumentTree(wrap(document));
|
||||
upgradeDocumentTree(window.wrap(document));
|
||||
if (window.HTMLImports) {
|
||||
HTMLImports.__importsParsingHook = function(elt) {
|
||||
window.HTMLImports.__importsParsingHook = function(elt) {
|
||||
upgradeDocumentTree(wrap(elt.import));
|
||||
};
|
||||
}
|
||||
CustomElements.ready = true;
|
||||
window.CustomElements.ready = true;
|
||||
setTimeout(function() {
|
||||
CustomElements.readyTime = Date.now();
|
||||
window.CustomElements.readyTime = Date.now();
|
||||
if (window.HTMLImports) {
|
||||
CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
|
||||
window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
|
||||
}
|
||||
document.dispatchEvent(new CustomEvent("WebComponentsReady", {
|
||||
bubbles: true
|
||||
@@ -7005,6 +7018,13 @@ CustomElements.addModule(function(scope) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
@@ -7014,7 +7034,7 @@ CustomElements.addModule(function(scope) {
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
bootstrap();
|
||||
} else {
|
||||
var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
||||
window.addEventListener(loadEvent, bootstrap);
|
||||
}
|
||||
scope.isIE11OrOlder = isIE11OrOlder;
|
||||
@@ -7090,7 +7110,7 @@ CustomElements.addModule(function(scope) {
|
||||
if (HTMLImports.useNative) {
|
||||
installPolymerWarning();
|
||||
} else {
|
||||
addEventListener("DOMContentLoaded", installPolymerWarning);
|
||||
window.addEventListener("DOMContentLoaded", installPolymerWarning);
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
|
||||
+5
-6
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user