File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 729
729
</ script >
730
730
</ dom-module >
731
731
732
+ < script type ="module ">
733
+ import { PolymerElement , html } from '../../polymer-element.js' ;
734
+ class ClassBindingUndefined extends PolymerElement {
735
+ static get is ( ) { return 'class-binding-undefined' ; }
736
+ static get properties ( ) {
737
+ return {
738
+ data : {
739
+ type : Object
740
+ }
741
+ } ;
742
+ }
743
+ static get template ( ) {
744
+ return html `
745
+ < style >
746
+ div {
747
+ border : 10px solid black;
748
+ }
749
+ </ style >
750
+ < div id ="div " class$ ="[[data.class]] "> Foo</ div >
751
+ ` ;
752
+ }
753
+ }
754
+ customElements . define ( ClassBindingUndefined . is , ClassBindingUndefined ) ;
755
+ </ script >
756
+
732
757
< script type ="module ">
733
758
import { dom } from '../../lib/legacy/polymer.dom.js' ;
734
759
import { flush } from '../../lib/utils/flush.js' ;
1015
1040
assert . isTrue ( el . classList . contains ( 'e' ) ) ;
1016
1041
} ) ;
1017
1042
1043
+ test ( 'scoping classes are preserved when a class$ binding resolves to undefined' , function ( ) {
1044
+ const e = document . createElement ( 'class-binding-undefined' ) ;
1045
+ document . body . appendChild ( e ) ;
1046
+ const el = e . $ . div ;
1047
+ assertComputed ( el , '10px' ) ;
1048
+ } ) ;
1049
+
1018
1050
} ) ;
1019
1051
1020
1052
suite ( 'double including style sheets' , function ( ) {
You can’t perform that action at this time.
0 commit comments