Fix type mismatch for reflected FrozenArray<T>?#12148
Fix type mismatch for reflected FrozenArray<T>?#12148gmvrpw wants to merge 1 commit intowhatwg:mainfrom
Conversation
Currently, the "cached attr-associated elements" variable has a list of
elements type but a null value can be assigned.
This commit:
- Changes the type of "cached attr-associated elements" from a list of
of elements to a list of elements or null
- Adds an additional null check before using the cached
attr-associated elements in the getter steps
|
Thanks for this PR! It's not editorial because there is a change in what is required. As such, there should be tests. Please put back the PR template. If browsers already pass the tests the implementer interest checkbox can be checked. |
|
Thanks for clarifying. I'll return with the tests. |
|
This is tested by |
|
But yeah, please restore the PR template as well as we want to do our due diligence here. cc @twilco |
annevk
left a comment
There was a problem hiding this comment.
I think this is correct. I think we could also have returned early for elements being null, but that would keep around a garbage cached value for longer, which isn't exactly clean.
|
Description has been restored 🤖 |
Currently, the "cached attr-associated elements" variable has a list of elements type but a null value can be assigned.
Browsers work logically as possible and ignore this strange behavior, which can be easily verified:
/acknowledgements.html ( diff )
/common-dom-interfaces.html ( diff )