@@ -173,14 +173,22 @@ export const renderer: Renderer<HostNode, HostElement> = {
173
173
return new Proxy (
174
174
{ } ,
175
175
{
176
- get ( target , property ) {
176
+ get ( target , property ) : string {
177
+ let value : string ;
178
+
177
179
const styleAttribute = getStyleAttribute ( ) ;
178
180
if ( isUndefined ( styleAttribute ) ) {
179
181
return '' ;
180
182
}
181
183
182
- const cssDeclaration = styleTextToCssDeclaration ( styleAttribute . value ) ;
183
- return cssDeclaration [ property as string ] || '' ;
184
+ if ( property === 'cssText' ) {
185
+ value = styleAttribute . value ;
186
+ } else {
187
+ const cssDeclaration = styleTextToCssDeclaration ( styleAttribute . value ) ;
188
+ value = cssDeclaration [ property as string ] || '' ;
189
+ }
190
+
191
+ return value ;
184
192
} ,
185
193
set ( target , property , value ) {
186
194
let styleAttribute = getStyleAttribute ( ) ;
@@ -194,9 +202,13 @@ export const renderer: Renderer<HostNode, HostElement> = {
194
202
element . attributes . push ( styleAttribute ) ;
195
203
}
196
204
197
- const cssDeclaration = styleTextToCssDeclaration ( styleAttribute . value ) ;
198
- cssDeclaration [ property as string ] = value ;
199
- styleAttribute . value = cssDeclarationToStyleText ( cssDeclaration ) ;
205
+ if ( property === 'cssText' ) {
206
+ styleAttribute . value = value ;
207
+ } else {
208
+ const cssDeclaration = styleTextToCssDeclaration ( styleAttribute . value ) ;
209
+ cssDeclaration [ property as string ] = value ;
210
+ styleAttribute . value = cssDeclarationToStyleText ( cssDeclaration ) ;
211
+ }
200
212
201
213
return value ;
202
214
} ,
0 commit comments