Permalink
Browse files

fixed Chrome V0 issue

1 parent 86323c0 commit 7dd229686fb4830b8c289f156222b87eec36ef0a @WebReflection committed Feb 20, 2017
View
@@ -155,7 +155,7 @@ in your head element and you should be good to go.
Many thanks to [cdnjs](http://www.cdnjs.com) for hosting this script. Following an example on how to include it.
```html
<script
- src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/1.4.0/document-register-element.js"
+ src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/1.4.1/document-register-element.js"
>/* W3C Custom Elements */</script>
```
Oops, something went wrong.
Oops, something went wrong.
@@ -671,6 +671,7 @@ define(function(polyfill){'use strict';
asapTimer = 0,
// internal flags
+ V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
@@ -694,7 +695,7 @@ define(function(polyfill){'use strict';
;
// only if needed
- if (!(REGISTER_ELEMENT in document)) {
+ if (!V0) {
if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
@@ -1387,8 +1388,10 @@ define(function(polyfill){'use strict';
patchedCreateElement.call(this, name, secondArgument(is)) :
patchedCreateElement.call(this, name);
});
- justSetup = true;
- document[REGISTER_ELEMENT]('');
+ if (!V0) {
+ justSetup = true;
+ document[REGISTER_ELEMENT]('');
+ }
}
// if customElements is not there at all
@@ -671,6 +671,7 @@ THE SOFTWARE.
asapTimer = 0,
// internal flags
+ V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
@@ -694,7 +695,7 @@ THE SOFTWARE.
;
// only if needed
- if (!(REGISTER_ELEMENT in document)) {
+ if (!V0) {
if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
@@ -1387,8 +1388,10 @@ THE SOFTWARE.
patchedCreateElement.call(this, name, secondArgument(is)) :
patchedCreateElement.call(this, name);
});
- justSetup = true;
- document[REGISTER_ELEMENT]('');
+ if (!V0) {
+ justSetup = true;
+ document[REGISTER_ELEMENT]('');
+ }
}
// if customElements is not there at all
@@ -674,6 +674,7 @@ function installCustomElements(window, polyfill) {'use strict';
asapTimer = 0,
// internal flags
+ V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
@@ -697,7 +698,7 @@ function installCustomElements(window, polyfill) {'use strict';
;
// only if needed
- if (!(REGISTER_ELEMENT in document)) {
+ if (!V0) {
if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
@@ -1390,8 +1391,10 @@ function installCustomElements(window, polyfill) {'use strict';
patchedCreateElement.call(this, name, secondArgument(is)) :
patchedCreateElement.call(this, name);
});
- justSetup = true;
- document[REGISTER_ELEMENT]('');
+ if (!V0) {
+ justSetup = true;
+ document[REGISTER_ELEMENT]('');
+ }
}
// if customElements is not there at all
View
@@ -674,6 +674,7 @@ function installCustomElements(window, polyfill) {'use strict';
asapTimer = 0,
// internal flags
+ V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
@@ -697,7 +698,7 @@ function installCustomElements(window, polyfill) {'use strict';
;
// only if needed
- if (!(REGISTER_ELEMENT in document)) {
+ if (!V0) {
if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
@@ -1390,8 +1391,10 @@ function installCustomElements(window, polyfill) {'use strict';
patchedCreateElement.call(this, name, secondArgument(is)) :
patchedCreateElement.call(this, name);
});
- justSetup = true;
- document[REGISTER_ELEMENT]('');
+ if (!V0) {
+ justSetup = true;
+ document[REGISTER_ELEMENT]('');
+ }
}
// if customElements is not there at all
@@ -236,6 +236,7 @@ var
asapTimer = 0,
// internal flags
+ V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
@@ -259,7 +260,7 @@ var
;
// only if needed
-if (!(REGISTER_ELEMENT in document)) {
+if (!V0) {
if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
@@ -952,8 +953,10 @@ function polyfillV1() {
patchedCreateElement.call(this, name, secondArgument(is)) :
patchedCreateElement.call(this, name);
});
- justSetup = true;
- document[REGISTER_ELEMENT]('');
+ if (!V0) {
+ justSetup = true;
+ document[REGISTER_ELEMENT]('');
+ }
}
// if customElements is not there at all

0 comments on commit 7dd2296

Please sign in to comment.