Skip to content

Instantly share code, notes, and snippets.

@leumasme
leumasme / onbeforescriptexecute.js
Last active July 4, 2022 18:46 — forked from maple3142/onbeforescriptexecute.js
polyfill of 'beforescriptexecute' event
// 'beforescriptexecute' event with loadPayloadSync
// original version: https://gist.github.com/jspenguin2017/cd568a50128c71e515738413cd09a890
;(function () {
'use strict';
class Event {
constructor(script, target) {
this.script = script;
this.target = target;