Skip to content

Add Element.toggleAttribute() polyfill and support in Shady DOM#541

Merged
justinfagnani merged 23 commits into
masterfrom
toggle-attribute
Mar 29, 2023
Merged

Add Element.toggleAttribute() polyfill and support in Shady DOM#541
justinfagnani merged 23 commits into
masterfrom
toggle-attribute

Conversation

@justinfagnani

@justinfagnani justinfagnani commented Mar 23, 2023

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread packages/custom-elements/ts_src/Patch/Element.ts Outdated
Comment thread packages/custom-elements/ts_src/Patch/Element.ts Outdated
Comment thread packages/shadydom/src/wrapper.js Outdated
Comment thread packages/formdata-event/ts_src/environment/element.ts Outdated
Comment thread packages/shadydom/src/patches/Element.js
Comment thread packages/shadydom/src/patches/Element.js Outdated
Comment thread packages/shadydom/src/patches/Element.js
justinfagnani and others added 9 commits March 24, 2023 15:22
Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Russell Bicknell <bicknellr@google.com>
@justinfagnani

Copy link
Copy Markdown
Collaborator Author

Added some tests. I think this is mostly in the right shape now, except for actually adding a toggleAttribute() polyfill for IE. The tests at least cover toggleAttribute() patching behavior in browsers that have it natively.

@justinfagnani justinfagnani marked this pull request as ready for review March 25, 2023 00:09
@justinfagnani justinfagnani requested a review from aomarks as a code owner March 25, 2023 00:09
@justinfagnani justinfagnani requested a review from sorvell March 25, 2023 00:09
@justinfagnani justinfagnani changed the title WIP: add toggleAttribute Add Element.toggleAttribute() polyfill and support in Shady DOM Mar 25, 2023
@justinfagnani

Copy link
Copy Markdown
Collaborator Author

Ready for review!

Comment thread packages/tests/webcomponentsjs_/toggle-attribute.html Outdated
Comment thread packages/shadydom/src/patches/Element.js
Comment thread packages/custom-elements/CHANGELOG.md Outdated
Comment thread packages/formdata-event/ts_src/environment/element.ts Outdated
Comment thread packages/shadydom/CHANGELOG.md Outdated
Comment thread packages/shadydom/src/patches/Element.js Outdated
Comment thread packages/shadydom/src/patches/Element.js Outdated
Comment thread packages/tests/custom-elements/html/Element/toggleAttribute.test.html Outdated
Comment thread packages/tests/custom-elements/html/Element/toggleAttribute.test.html Outdated
Comment thread packages/tests/custom-elements/html/Element/toggleAttribute.test.html Outdated
Comment thread packages/tests/custom-elements/html/Element/toggleAttribute.test.html Outdated
Comment thread packages/custom-elements/ts_src/Patch/Element.ts Outdated
justinfagnani and others added 5 commits March 24, 2023 18:15
Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Steve Orvell <sorvell@google.com>
Comment thread packages/shadydom/src/patches/Element.js
Comment thread packages/formdata-event/ts_src/environment/element.ts Outdated
Comment thread packages/webcomponentsjs/ts_src/platform/toggle-attribute.ts
Comment thread packages/webcomponentsjs/ts_src/platform/toggle-attribute.ts Outdated
Comment thread packages/webcomponentsjs/ts_src/platform/toggle-attribute.ts Outdated
Comment thread packages/webcomponentsjs/ts_src/platform/toggle-attribute.ts Outdated
Comment thread packages/webcomponentsjs/ts_src/platform/toggle-attribute.ts Outdated
justinfagnani and others added 2 commits March 27, 2023 18:12
Co-authored-by: Russell Bicknell <bicknellr@google.com>

@bicknellr bicknellr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess one thing we might want to test is the return values from toggleAttribute, otherwise LGTM for the custom elements polyfill and platform polyfills stuff.

Comment thread packages/tests/custom-elements/html/Element/toggleAttribute.test.html Outdated
@justinfagnani justinfagnani merged commit ee3a436 into master Mar 29, 2023
@justinfagnani justinfagnani deleted the toggle-attribute branch March 29, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants