File tree 3 files changed +16
-2
lines changed
src/compile/render-dom/wrappers/Element
test/runtime/samples/attribute-url
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ function get_style_value(chunks: Node[]) {
122
122
} else if ( char === '\\' ) {
123
123
escaped = true ;
124
124
} else if ( char === quote_mark ) {
125
- quote_mark === null ;
125
+ quote_mark = null ;
126
126
} else if ( char === '"' || char === "'" ) {
127
127
quote_mark = char ;
128
128
} else if ( char === ')' && in_url ) {
@@ -173,4 +173,4 @@ function get_style_value(chunks: Node[]) {
173
173
174
174
function is_dynamic ( value : Node [ ] ) {
175
175
return value . length > 1 || value [ 0 ] . type !== 'Text' ;
176
- }
176
+ }
Original file line number Diff line number Diff line change
1
+ export default {
2
+ test ( { assert, target } ) {
3
+ const div = target . querySelector ( 'div' ) ;
4
+
5
+ assert . equal ( div . style . backgroundImage , 'url(https://example.com/foo.jpg)' ) ;
6
+ assert . equal ( div . style . color , 'red' ) ;
7
+ }
8
+ } ;
Original file line number Diff line number Diff line change
1
+ <script >
2
+ let bgImage = ' https://example.com/foo.jpg' ;
3
+ let color = ' red' ;
4
+ </script >
5
+
6
+ <div style ="background-image: url(' {bgImage }'); color: {color };" >{color }</div >
You can’t perform that action at this time.
0 commit comments