Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
fixed Chrome V0 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Giammarchi committed Feb 20, 2017
1 parent 86323c0 commit 7dd2296
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
```

Expand Down
2 changes: 1 addition & 1 deletion build/document-register-element.amd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/document-register-element.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions build/document-register-element.max.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ define(function(polyfill){'use strict';
asapTimer = 0,

// internal flags
V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions build/document-register-element.max.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ THE SOFTWARE.
asapTimer = 0,

// internal flags
V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
Expand All @@ -694,7 +695,7 @@ THE SOFTWARE.
;

// only if needed
if (!(REGISTER_ELEMENT in document)) {
if (!V0) {

if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions build/document-register-element.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions pony/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions src/document-register-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ var
asapTimer = 0,

// internal flags
V0 = REGISTER_ELEMENT in document,
setListener = true,
justSetup = false,
doesNotSupportDOMAttrModified = true,
Expand All @@ -259,7 +260,7 @@ var
;

// only if needed
if (!(REGISTER_ELEMENT in document)) {
if (!V0) {

if (sPO || hasProto) {
patchIfNotAlready = function (node, proto) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7dd2296

Please sign in to comment.