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
{{ message }}
Repository navigation
Add new scriptlet — 'trusted-replace-script-text' #516
To replace (like trusted-replace-* scriptlet) or prevent any script that is loaded via HTMLScriptElement.prototype.src (In Firefox, it is displayed as blob:<domain>/<uuid>), I think that mocking settering any primitive value as value of a property is required.
changed the title [-]Mock settering any primitive type as value of a property[/-][+]Improve 'set-constant' — support mocking setter for any primitive type[/+]on Mar 18, 2026
changed the title [-]Improve 'set-constant' — support mocking setter for any primitive type[/-][+]Add new scriptlet — 'trusted-replace-script-text'[/+]on Mar 20, 2026
I think the key should be trusted-replace-script-src rather than -text, since the latter could be confused with trusted-replace-node-text, which replaces node.innerText.
Activity
[-]Mock settering any primitive type as value of a property[/-][+]Improve 'set-constant' — support mocking setter for any primitive type[/+][-]Improve 'set-constant' — support mocking setter for any primitive type[/-][+]Add new scriptlet — 'trusted-replace-script-text'[/+]AdamWr commentedon Jun 10, 2026
Could you please provide very simple example what exactly this scriptlet should do?
piquark6046 commentedon Jun 10, 2026
It looks like
trusted-replace-node-textAdamWr commentedon Jun 10, 2026
So for example, if there is a script like this:
This line:
You would like a scriptlet which could replace content of
srcproperty.Do I understand correctly?
piquark6046 commentedon Oct 26, 2026
Yes.
mu-hun commentedon Oct 26, 2026
I think the key should be
trusted-replace-script-srcrather than-text, since the latter could be confused withtrusted-replace-node-text, which replacesnode.innerText.