JSFiddle - React, Tailwind, and code Playground
by Julien Etienne
JavaScript
import { template as _$template } from "solid-js/web";
import { createComponent as _$createComponent } from "solid-js/web";
import { setAttribute as _$setAttribute } from "solid-js/web";
import { effect as _$effect } from "solid-js/web";
const _tmpl$ = /*#__PURE__*/_$template(`<div><a>XSS`);
import { render } from "solid-js/web";
function Counter() {
const XSS = () => "javascript:alert('XSS')";
return (() => {
const _el$ = _tmpl$(),
_el$2 = _el$.firstChild;
_$effect(() => _$setAttribute(_el$2, "href", XSS()));
return _el$;
})();
}
render(() => _$createComponent(Counter, {}), document.getElementById("app"));