- From: Shiino Yuki <notifications@github.com>
- Date: Fri, 21 Feb 2020 03:00:16 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 21 February 2020 11:00:32 UTC
I have a question. `[StringContext=XXX] DOMString value` seems expected to behave like the following. https://github.com/heycam/webidl/pull/841#issuecomment-586413864 ``` if TTNotEnforced: return v.toString() if isCorrectTrustedType(v, context): return v.toString(); elseif realm.defaultPolicy: v = realm.defaultPolicy.sanitize(v, context) // this might throw. return v.toString() ``` where `isCorrectTrustedType(v, context)` requires knowledge about `TrustedHTML`, `TrustedScript`, and `TrustedScriptURL` IDL interfaces. Is this expected in Web IDL? Or, is this okay if it's monkey-patched in other specs? I'm now just wondering if this is cleaner or clearer than `(TrustedHTML or [StringContext=TrustedHTML] DOMString)` or not. It seems to me like we're doing another type resolution during ES-to-IDL value conversion although overload resolution (= type resolution) is already done at this point. If this doesn't matter much, please move on. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/841#issuecomment-589605877
Received on Friday, 21 February 2020 11:00:32 UTC