Re: [heycam/webidl] Added a definition of {{StringContext}} extended attribute. (#841)

Er, clicked submit too early.

> the annotated type route was taken as a preferred option for simplicity 

Yes, this makes sense.

> and sorry for looping you in that late into the discussion

No need to apologize.  I don't have the bandwidth to be in all discussions all the time, and certainly didn't for this one...

I think I finally understand what the proposed setup here is.  From an IDL and implementation point of view (now with my Mozilla hat on for the latter), the main complexity is threading through the information about what operation/setter is involved to the conversion site.  If we didn't need to worry about unions we could do the check as in "option 2" _before_ doing the arg conversion, and that's _fairly_ simple to spec and implement, depending on what information about the operation is needed.  Specifically, it doesn't allow distinguishing overloads, but neither does any variant of option 1; the only way to do that is options 3 or 4.

But if we want to have the semantics that `void foo(([StringContext=html] DOMString or Node) arg);` only invokes sanitization for non-Nodes, then it seems like the approach in this PR is the only really viable option, and we need to deal with threading the information about what operation/setter is involved through to the specific string type conversions...

-- 
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-586421175

Received on Friday, 14 February 2020 18:52:25 UTC