Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.04k stars 2.01k forks source link

Adds Trusted Types support for reflected boolean properties. #5701

Closed bicknellr closed 2 years ago

bicknellr commented 2 years ago

Like https://github.com/Polymer/polymer/commit/8582dd6449822e003313dee3e6792aa0a8f98989, this is also to work around https://crbug.com/993268. Given that this bug should be fixed now, I'm not sure if we want to upstream this (since we're already including a workaround for it elsewhere) or leave it as an internal only patch.

rictic commented 2 years ago

Oh yay, the on* bug was fixed! It'll be weeks at best before it's in stable though, so I think this is good to land

bicknellr commented 2 years ago

SGTM. Also, I just realized that I didn't update the types, so I'll work on that and post again once I've pushed a fix.

bicknellr commented 2 years ago

Closure's type for setAttribute seems to be wrong, so I had to cast .emptyScript with ?. Also, I moved this into the same method as the setAttribute call so that I didn't have to update _serializeValue's return value or its callers. PTAL