File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,16 @@ class DomIfBase extends PolymerElement {
63
63
restamp : {
64
64
type : Boolean ,
65
65
observer : '__debounceRender'
66
- }
66
+ } ,
67
67
68
+ /**
69
+ * When the global `legacyOptimizations` setting is used, setting
70
+ * `notifyDomChange: true` will enable firing `dom-change` events on this
71
+ * element.
72
+ */
73
+ notifyDomChange : {
74
+ type : Boolean
75
+ }
68
76
} ;
69
77
70
78
}
@@ -244,7 +252,7 @@ class DomIfBase extends PolymerElement {
244
252
this . __teardownInstance ( ) ;
245
253
}
246
254
this . _showHideChildren ( ) ;
247
- if ( ! legacyOptimizations && this . if != this . _lastIf ) {
255
+ if ( ( ! legacyOptimizations || this . notifyDomChange ) && this . if != this . _lastIf ) {
248
256
this . dispatchEvent ( new CustomEvent ( 'dom-change' , {
249
257
bubbles : true ,
250
258
composed : true
Original file line number Diff line number Diff line change @@ -276,6 +276,15 @@ export class DomRepeat extends domRepeatBase {
276
276
_targetFrameTime : {
277
277
type : Number ,
278
278
computed : '__computeFrameTime(targetFramerate)'
279
+ } ,
280
+
281
+ /**
282
+ * When the global `legacyOptimizations` setting is used, setting
283
+ * `notifyDomChange: true` will enable firing `dom-change` events on this
284
+ * element.
285
+ */
286
+ notifyDomChange : {
287
+ type : Boolean
279
288
}
280
289
281
290
} ;
@@ -546,7 +555,7 @@ export class DomRepeat extends domRepeatBase {
546
555
// Set rendered item count
547
556
this . _setRenderedItemCount ( this . __instances . length ) ;
548
557
// Notify users
549
- if ( ! legacyOptimizations ) {
558
+ if ( ! legacyOptimizations || this . notifyDomChange ) {
550
559
this . dispatchEvent ( new CustomEvent ( 'dom-change' , {
551
560
bubbles : true ,
552
561
composed : true
You can’t perform that action at this time.
0 commit comments