fix: remove unncessary guards that require CSP privilege when removing event attributes (#15846)

* fix: remove unncessary guards that cause CSP violations when removing event attributes

* add changeset
pull/15906/head
Ryan Atkinson 4 months ago committed by GitHub
parent fbb1aecc2d
commit d4fb9f4b10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: remove unncessary guards that require CSP privilege when removing event attributes

@ -26,12 +26,8 @@ export const root_event_handles = new Set();
export function replay_events(dom) {
if (!hydrating) return;
if (dom.onload) {
dom.removeAttribute('onload');
}
if (dom.onerror) {
dom.removeAttribute('onerror');
}
dom.removeAttribute('onload');
dom.removeAttribute('onerror');
// @ts-expect-error
const event = dom.__e;
if (event !== undefined) {

Loading…
Cancel
Save