Skip to content

Trusted Types Support #443

@kekizz

Description

@kekizz

Hello!

I would like to request trusted types support for the package.

Specifically, we need to be able to pass a policy instance and for this instance to be used in every Worker constructor.

As of today, there is only one Worker constructor that needs the policy which is in the worker-timers-broker dependency, module.ts file, line 12.

I understand we can achieve this by using the dependencies directly, but for the sake of convenience it would be great if we can add it here.

For example, in load-or-return-broker.ts:

Before
broker = loadBroker(url)

After

...
if (trustedTypesPolicyInstance) {
   const trustedUrl = trustedTypesPolicyInstance.createScriptURL(url);
   broker = loadBroker(trustedUrl)
}
...

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions