Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

#551 - V1 custom elements - missing functionality #552

Closed
wants to merge 6 commits into from
Closed

#551 - V1 custom elements - missing functionality #552

wants to merge 6 commits into from

Conversation

treshugart
Copy link
Contributor

@treshugart treshugart commented Jun 6, 2016

Implements #551.

I had some issues running the v1 tests which I'm going to try and get running now.

@treshugart treshugart changed the title #551 add CustomElementRegistry.get() and call attributeChangedCallback() for all existing attributes #551 - Add CustomElementRegistry.get() and call attributeChangedCallback() for all existing attributes Jun 6, 2016
@treshugart treshugart changed the title #551 - Add CustomElementRegistry.get() and call attributeChangedCallback() for all existing attributes #551 - V1 custom elements - missing functionality Jun 6, 2016
@@ -237,11 +243,21 @@ var CustomElementDefinition;
new (definition.constructor)();
console.assert(this._newInstance == null);
}
if (definition.attributeChangedCallback && definition.observedAttributes.length > 0) {

var observedAttributes = definition.observedAttributes;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to lookup the property only once since there's multiple lookups below.

var xboo = new XBoo();
xboo.setAttribute('test1', 'test1');
xboo.setAttribute('test2', 'test2');
customElements.flush();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seemed to be how other tests were initiating an upgrade pass. I'll get the tests running and then correct this if need be.

@treshugart treshugart closed this Jun 8, 2016
@treshugart
Copy link
Contributor Author

Closing so I can separate the features added.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant