Re: [whatwg/encoding] Make TextEncoder and TextDecoder be transform streams (#127)

I think we should indeed make split surrogates work. It seems like a big value proposition for having this built-in and shared, that people don't have to figure that out by themselves.

> I think a problem here is that if a script running in a document invokes the constructor of either TextDecoder or TextEncoder in an `<iframe>` element the tear-off transform-related objects will have the associated global of the document (the current global/realm) and not the `<iframe>`'s document.

I don't think that is true. You're talking about `new childIframe.contentWindow.TextEncoder()` The current realm inside the TextEncoder constructor is that of the constructor itself, i.e. of the iframe, so CreateTransformStream will still be in that realm, and the `TransformStream` objects will be from the same realm as the TextEncoder object constructed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/pull/127#issuecomment-351432998

Received on Wednesday, 13 December 2017 15:53:42 UTC