diff --git a/src/CustomElements/CustomElements.js b/src/CustomElements/CustomElements.js
index d71629d..8ef94e6 100644
--- a/src/CustomElements/CustomElements.js
+++ b/src/CustomElements/CustomElements.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
diff --git a/src/CustomElements/base.js b/src/CustomElements/base.js
index a971763..e0177a5 100644
--- a/src/CustomElements/base.js
+++ b/src/CustomElements/base.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -32,7 +33,7 @@ scope.hasNative = Boolean(document.registerElement);
// NOTE: For consistent timing, use native custom elements only when not
// polyfilling other key related web components features.
-scope.useNative = !flags.register && scope.hasNative &&
+scope.useNative = !flags.register && scope.hasNative &&
!window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
-})(CustomElements);
\ No newline at end of file
+})(CustomElements);
diff --git a/src/CustomElements/boot.js b/src/CustomElements/boot.js
index c3106e8..3eab0b6 100644
--- a/src/CustomElements/boot.js
+++ b/src/CustomElements/boot.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -33,8 +34,8 @@ if (useNative) {
};
} else {
- // Initialize polyfill modules. Note, polyfill modules are loaded but not
- // executed; this is a convenient way to control which modules run when
+ // Initialize polyfill modules. Note, polyfill modules are loaded but not
+ // executed; this is a convenient way to control which modules run when
// the polyfill is required and allows the polyfill to load even when it's
// not needed.
initializeModules();
@@ -67,7 +68,7 @@ function bootstrap() {
//CustomElements.parser.parse(elt.import);
};
}
- // set internal 'ready' flag, now document.registerElement will trigger
+ // set internal 'ready' flag, now document.registerElement will trigger
// synchronous upgrades
CustomElements.ready = true;
// async to ensure *native* custom elements upgrade prior to this
@@ -108,7 +109,7 @@ if (document.readyState === 'complete' || scope.flags.eager) {
} else if (document.readyState === 'interactive' && !window.attachEvent &&
(!window.HTMLImports || window.HTMLImports.ready)) {
bootstrap();
-// When loading at other readyStates, wait for the appropriate DOM event to
+// When loading at other readyStates, wait for the appropriate DOM event to
// bootstrap.
} else {
var loadEvent = window.HTMLImports && !HTMLImports.ready ?
diff --git a/src/CustomElements/observe.js b/src/CustomElements/observe.js
index 6530f7f..23c3146 100644
--- a/src/CustomElements/observe.js
+++ b/src/CustomElements/observe.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -101,9 +102,9 @@ function attached(element) {
// multiple times so we protect against extra processing here.
function _attached(element) {
// track element for insertion if it's upgraded and cares about insertion
- if (element.__upgraded__ &&
+ if (element.__upgraded__ &&
(element.attachedCallback || element.detachedCallback)) {
- // bail if the element is already marked as attached and proceed only
+ // bail if the element is already marked as attached and proceed only
// if it's actually in the document at this moment.
if (!element.__attached && inDocument(element)) {
element.__attached = true;
@@ -118,7 +119,7 @@ function _attached(element) {
Manage nodes detached from document trees
*/
-// manage lifecycle on detached node and it's subtree; process detached
+// manage lifecycle on detached node and it's subtree; process detached
// for the node and entire subtree
function detachedNode(node) {
detached(node);
@@ -141,9 +142,9 @@ function detached(element) {
// multiple times so we protect against extra processing here.
function _detached(element) {
// track element for removal if it's upgraded and cares about removal
- if (element.__upgraded__ &&
+ if (element.__upgraded__ &&
(element.attachedCallback || element.detachedCallback)) {
- // bail if the element is already marked as not attached and proceed only
+ // bail if the element is already marked as not attached and proceed only
// if it's actually *not* in the document at this moment.
if (element.__attached && !inDocument(element)) {
element.__attached = false;
@@ -187,7 +188,7 @@ function watchShadow(node) {
Here's an example:
- (1) In this case, recursion is required to see `child`:
+ (1) In this case, recursion is required to see `child`:
node.innerHTML = '
'
@@ -233,7 +234,7 @@ function handler(mutations) {
/*
- When elements are added to the dom, upgrade and attached/detached may be
+ When elements are added to the dom, upgrade and attached/detached may be
asynchronous. `CustomElements.takeRecords` can be called to process any
pending upgrades and attached/detached callbacks synchronously.
*/
@@ -280,7 +281,7 @@ function upgradeDocument(doc) {
/*
This method is intended to be called when the document tree (including imports)
-has pending custom elements to upgrade. It can be called multiple times and
+has pending custom elements to upgrade. It can be called multiple times and
should do nothing if no elements are in need of upgrade.
*/
function upgradeDocumentTree(doc) {
diff --git a/src/CustomElements/register.js b/src/CustomElements/register.js
index 246de07..45d9fc2 100644
--- a/src/CustomElements/register.js
+++ b/src/CustomElements/register.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
diff --git a/src/CustomElements/traverse.js b/src/CustomElements/traverse.js
index 8dbada5..e8e8a43 100644
--- a/src/CustomElements/traverse.js
+++ b/src/CustomElements/traverse.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
diff --git a/src/CustomElements/upgrade.js b/src/CustomElements/upgrade.js
index 2ce0b75..47e18bd 100644
--- a/src/CustomElements/upgrade.js
+++ b/src/CustomElements/upgrade.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -66,7 +67,7 @@ function upgradeWithDefinition(element, definition) {
return element;
}
-// Set __proto__ on supported platforms and use a mixin strategy when
+// Set __proto__ on supported platforms and use a mixin strategy when
// this is not supported; e.g. on IE10.
function implementPrototype(element, definition) {
// prototype swizzling is best
diff --git a/src/HTMLImports/HTMLImports.js b/src/HTMLImports/HTMLImports.js
index 317cae4..2b76f5d 100644
--- a/src/HTMLImports/HTMLImports.js
+++ b/src/HTMLImports/HTMLImports.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
diff --git a/src/HTMLImports/Loader.js b/src/HTMLImports/Loader.js
index e5c2a1c..b413d30 100644
--- a/src/HTMLImports/Loader.js
+++ b/src/HTMLImports/Loader.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -14,8 +15,8 @@ var flags = scope.flags;
// This loader supports a dynamic list of urls
// and an oncomplete callback that is called when the loader is done.
-// NOTE: The polyfill currently does *not* need this dynamism or the
-// onComplete concept. Because of this, the loader could be simplified
+// NOTE: The polyfill currently does *not* need this dynamism or the
+// onComplete concept. Because of this, the loader could be simplified
// quite a bit.
var Loader = function(onLoad, onComplete) {
this.cache = {};
@@ -132,4 +133,4 @@ Loader.prototype = {
// exports
scope.Loader = Loader;
-});
\ No newline at end of file
+});
diff --git a/src/HTMLImports/Observer.js b/src/HTMLImports/Observer.js
index 128cdde..4b75091 100644
--- a/src/HTMLImports/Observer.js
+++ b/src/HTMLImports/Observer.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
diff --git a/src/HTMLImports/base.js b/src/HTMLImports/base.js
index cb68aee..3b23f70 100644
--- a/src/HTMLImports/base.js
+++ b/src/HTMLImports/base.js
@@ -1,4 +1,5 @@
-/*
+/**
+ * @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@@ -45,9 +46,9 @@ var currentScriptDescriptor = {
get: function() {
var script = HTMLImports.currentScript || document.currentScript ||
// NOTE: only works when called in synchronously executing code.
- // readyState should check if `loading` but IE10 is
+ // readyState should check if `loading` but IE10 is
// interactive when scripts run so we cheat.
- (document.readyState !== 'complete' ?
+ (document.readyState !== 'complete' ?
document.scripts[document.scripts.length - 1] : null);
return wrap(script);
},
@@ -64,16 +65,16 @@ Object.defineProperty(rootDocument, '_currentScript', currentScriptDescriptor);
code in either an `HTMLImportsLoaded` hander or after load time in an
`HTMLImports.whenReady(callback)` call.
- NOTE: This module also supports these apis under the native implementation.
- Therefore, if this file is loaded, the same code can be used under both
+ NOTE: This module also supports these apis under the native implementation.
+ Therefore, if this file is loaded, the same code can be used under both
the polyfill and native implementation.
*/
var isIE = /Trident/.test(navigator.userAgent);
-// call a callback when all HTMLImports in the document at call time
+// call a callback when all HTMLImports in the document at call time
// (or at least document ready) have loaded.
-// 1. ensure the document is in a ready state (has dom), then
+// 1. ensure the document is in a ready state (has dom), then
// 2. watch for loading of imports and call callback when done
function whenReady(callback, doc) {
doc = doc || rootDocument;
@@ -95,7 +96,7 @@ function isDocumentReady(doc) {
function whenDocumentReady(callback, doc) {
if (!isDocumentReady(doc)) {
var checkReady = function() {
- if (doc.readyState === 'complete' ||
+ if (doc.readyState === 'complete' ||
doc.readyState === requiredReadyState) {
doc.removeEventListener(READY_EVENT, checkReady);
whenDocumentReady(callback, doc);
@@ -115,7 +116,7 @@ function markTargetLoaded(event) {
function watchImportsLoad(callback, doc) {
var imports = doc.querySelectorAll('link[rel=import]');
var loaded = 0, l = imports.length;
- function checkDone(d) {
+ function checkDone(d) {
if ((loaded == l) && callback) {
callback();
}
@@ -143,15 +144,15 @@ function watchImportsLoad(callback, doc) {
// all imports (see below).
// However, we cannot rely on this entirely without watching the entire document
// for import links. For perf reasons, currently only head is watched.
-// Instead, we fallback to checking if the import property is available
-// and the document is not itself loading.
+// Instead, we fallback to checking if the import property is available
+// and the document is not itself loading.
function isImportLoaded(link) {
- return useNative ? link.__loaded ||
+ return useNative ? link.__loaded ||
(link.import && link.import.readyState !== 'loading') :
link.__importParsed;
}
-// TODO(sorvell): Workaround for
+// TODO(sorvell): Workaround for
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007, should be removed when
// this bug is addressed.
// (1) Install a mutation observer to see when HTMLImports have loaded
@@ -159,7 +160,7 @@ function isImportLoaded(link) {
// imports for loading.
//
// NOTE: The workaround has restricted functionality: (1) it's only compatible
-// with imports that are added to document.head since the mutation observer
+// with imports that are added to document.head since the mutation observer
// watches only head for perf reasons, (2) it requires this script
// to run before any imports have completed loading.
if (useNative) {
@@ -174,7 +175,7 @@ if (useNative) {
function handleImports(nodes) {
for (var i=0, l=nodes.length, n; (i
::content(div) {
background: red;
}
-
+
could become:
-
+
padding: 20px
-
+
-
+
Expected: red background
-
+
Expected: red background
Expected: green background
-
+
Expected: black background
-
+
Expected: black background
-
+
Expected: red background with white text
Expected: red background with white text
-
+
Expected: red background with black text and orange border
-
+
Expected: red background with black text and orange border and 20px padding
@@ -172,59 +173,59 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+