Skip to content

Commit

Permalink
#628@trivial: Replace setAttribute by cssText assignment in style set…
Browse files Browse the repository at this point in the history
…ter.
  • Loading branch information
jledentu committed Oct 25, 2022
1 parent ecef36e commit 58d0751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/happy-dom/src/nodes/html-element/HTMLElement.ts
Expand Up @@ -207,7 +207,7 @@ export default class HTMLElement extends Element implements IHTMLElement {
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style#setting_styles
*/
public set style(cssText: string | CSSStyleDeclaration) {
this.setAttribute('style', typeof cssText === 'string' ? <string>cssText : '');
this.style.cssText = typeof cssText === 'string' ? <string>cssText : '';
}

/**
Expand Down

0 comments on commit 58d0751

Please sign in to comment.