You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The browser (jsdom, too) auto-repairs <!> tags to proper comments (e.g. <!---->). happy-dom does not do that and treats that character sequence as text. Frameworks like Svelte or Solid use this to their advantage to safe a bit of space when generating the template strings from which the component DOM tree is constructed.
Describe the solution you'd like
Add support for the shorthand, so that the following works as expected:
/** * @vitest-environment happy-dom */import{test}from"vitest";test("can render",()=>{constroot=document.createElement("div");root.innerHTML="x<!>y";document.body.append(root);console.log(document.body.innerHTML);// should print <div>x<!---->y</div> , currently prints <div>x<!>y</div>});
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The browser (jsdom, too) auto-repairs
<!>
tags to proper comments (e.g.<!---->
). happy-dom does not do that and treats that character sequence as text. Frameworks like Svelte or Solid use this to their advantage to safe a bit of space when generating the template strings from which the component DOM tree is constructed.Describe the solution you'd like
Add support for the shorthand, so that the following works as expected:
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered: