-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Labels
Milestone
Description
(Please fill out the issue template with your details)
Expected Behavior
TM manages to inject required resources
Actual Behavior
On websites using a strict Content-Security-Policy: require-trusted-types-for 'script';
/ trusted-types
, injection fails with the unhandled errors:
This document requires 'TrustedScript' assignment.
This document requires 'TrustedHTML' assignment.
(Full log attached)
Test the behavior here: https://benjamin-philipp.com/test-trusted-types.php?defaultPolicy=true
Specifications
- Chromium: 93.0.4577.82 (Official Build) (64-bit)
- TM: 4.13
- OS: Windows 10
Script
(Please give an example of the script if applicable.)
// ==UserScript==
// @name tmp
// @version 1.0.0
// @namespace bp
// @match https://benjamin-philipp.com/test-trusted-types.php*
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @require https://benjamin-philipp.com/js/gm/funcs.js?a=b
// @run-at document-body
// @noframes
// @grant none
// ==/UserScript==
console.log("With strict TrustedTypes implementation, this UserScript will fail while attempting to load the @requite scripts");
// $("#myElement").html("<p>toast</p>");