polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

Shady Parts: don't call _applyStyleProperties twice

Open aomarks opened this issue 4 years ago • 2 comments

Currently, when an instance consumes a ::part rule that consumes a custom property, and native custom properties are not available, _applyStyleProperties ends up getting run twice. Once is the normal case, via styleElement when the instance is connected. Then again, after the DOM has stamped and we notice that there are part rules to handle.

It might make sense to skip the first _applyStyleProperties if we know that an instance might be receiving a part rule with a custom property.

aomarks avatar Jun 04 '20 22:06 aomarks

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 04 '21 23:06 stale[bot]

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

stale[bot] avatar Sep 17 '23 16:09 stale[bot]