From 93109d125e462b50f8389061d7bea8a877c07d36 Mon Sep 17 00:00:00 2001 From: jalexanderfox Date: Thu, 16 Jun 2016 15:07:13 -0400 Subject: [PATCH 1/2] fix webcomponent example issue #7056 --- examples/webcomponents/index.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/webcomponents/index.html b/examples/webcomponents/index.html index 6342690dc55dd..11fb6eddb1258 100644 --- a/examples/webcomponents/index.html +++ b/examples/webcomponents/index.html @@ -38,6 +38,10 @@

Example Details

// Define WebComponent var proto = Object.create(HTMLElement.prototype, { createdCallback: { + value: function() { + } + } + ,attachedCallback: { value: function() { var mountPoint = document.createElement('span'); this.createShadowRoot().appendChild(mountPoint); @@ -47,6 +51,14 @@

Example Details

ReactDOM.render({name}, mountPoint); } } + ,detachedCallback: { + value: function() { + } + } + ,attributeChangedCallback: { + value: function() { + } + } }); document.registerElement('x-search', {prototype: proto}); From ec60c9cbe5f95a75c82249b8738e08219b6dd06b Mon Sep 17 00:00:00 2001 From: jalexanderfox Date: Tue, 21 Jun 2016 22:10:24 -0400 Subject: [PATCH 2/2] update fix issue #7056, remove unused web component callbacks --- examples/webcomponents/index.html | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/webcomponents/index.html b/examples/webcomponents/index.html index 11fb6eddb1258..7eccc805bf871 100644 --- a/examples/webcomponents/index.html +++ b/examples/webcomponents/index.html @@ -37,11 +37,7 @@

Example Details

// Define WebComponent var proto = Object.create(HTMLElement.prototype, { - createdCallback: { - value: function() { - } - } - ,attachedCallback: { + attachedCallback: { value: function() { var mountPoint = document.createElement('span'); this.createShadowRoot().appendChild(mountPoint); @@ -51,14 +47,6 @@

Example Details

ReactDOM.render({name}, mountPoint); } } - ,detachedCallback: { - value: function() { - } - } - ,attributeChangedCallback: { - value: function() { - } - } }); document.registerElement('x-search', {prototype: proto});