fix: allow string based event handlers in SSR (#1515)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<p>it doesn't work</p>
|
||||
<button // @ts-ignore - we don't officialy recommend this, but lots of
|
||||
// apps pre Fresh 1.2 use string based click handlers.
|
||||
onClick="document.querySelector('p').textContent = 'it works'">
|
||||
click me
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import StringEventIsland from "$fresh/tests/fixture/islands/StringEventIsland.tsx";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<p>it doesn't work</p>
|
||||
<StringEventIsland />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user