w3c / trusted-types

A browser API to prevent DOM-Based Cross Site Scripting in modern web applications.
https://w3c.github.io/trusted-types/dist/spec/
Other
586 stars 68 forks source link

Callback IDL types #482

Open lukewarlow opened 3 months ago

lukewarlow commented 3 months ago

Random thought I had while cleaning up some work in WebKit, does it actually make sense for the callbacks to have their own IDL type per callback? Each callback type is identical but currently they're 3 different type defs. Is there any benefit to this? Should we just do CreateTrustedTypeCallback?

https://w3c.github.io/trusted-types/dist/spec/#trusted-type-policy-options

annevk commented 3 months ago

CreateScriptURLCallback has a different return type. But there's no reason for the other two to not be unified.