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 729729</ script >
730730 </ dom-module >
731731
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+
732757< script type ="module ">
733758import { dom } from '../../lib/legacy/polymer.dom.js' ;
734759import { flush } from '../../lib/utils/flush.js' ;
10151040 assert . isTrue ( el . classList . contains ( 'e' ) ) ;
10161041 } ) ;
10171042
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+
10181050} ) ;
10191051
10201052suite ( 'double including style sheets' , function ( ) {
You can’t perform that action at this time.
0 commit comments