File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
packages/scoped-custom-element-registry Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
- <!-- ## Unreleased -->
8
+ ## Unreleased
9
+
10
+ ### Fixed
11
+
12
+ - toggleAttribute polyfill now retains the force argument if it is present
9
13
10
14
# [ 0.0.5] - 2022-02-18
11
15
Original file line number Diff line number Diff line change @@ -387,17 +387,19 @@ if (!ShadowRoot.prototype.createElement) {
387
387
patchHTMLElement ( definition . elementClass ) ;
388
388
new definition . elementClass ( ) ;
389
389
}
390
- // Approximate observedAttributes from the user class, since the stand-in element had none
391
- definition . observedAttributes . forEach ( ( attr ) => {
392
- if ( instance . hasAttribute ( attr ) ) {
393
- definition . attributeChangedCallback . call (
394
- instance ,
395
- attr ,
396
- null ,
397
- instance . getAttribute ( attr )
398
- ) ;
399
- }
400
- } ) ;
390
+ if ( definition . attributeChangedCallback ) {
391
+ // Approximate observedAttributes from the user class, since the stand-in element had none
392
+ definition . observedAttributes . forEach ( ( attr ) => {
393
+ if ( instance . hasAttribute ( attr ) ) {
394
+ definition . attributeChangedCallback . call (
395
+ instance ,
396
+ attr ,
397
+ null ,
398
+ instance . getAttribute ( attr )
399
+ ) ;
400
+ }
401
+ } ) ;
402
+ }
401
403
if ( isUpgrade && definition . connectedCallback && instance . isConnected ) {
402
404
definition . connectedCallback . call ( instance ) ;
403
405
}
You can’t perform that action at this time.
0 commit comments