Re: [editing-explainer] Can we use textnodes, and block/inline nodes as shadow roots for transparent IME handling? (#57)

> I don't think it's a thing on Mac either (I use both Windows and Mac and I'm a native Japanese speaker).

If you want to, I can put the two of you in touch. Not sure what kind of apps he is using.

> Anyway, the idea is that we'll have a special self-closing element, let's call it "caret" for now, that has a shadow DOM. A web app uses this element by inserting into at where the app wants the user to type in. e.g. <b><caret/></b> will let the user type a boldened text and when the browser moves the caret, blurs the focus, etc... it'll send some event, e.g. input event, to the app with the materialized text to insert it into the "real" DOM.

Please remember I'm on the JavaScript side of things so I don't entirely understand what's going on in the browser. Do I understand correctly that you propose to just insert ONE element into the DOM at composition start, and then everything will happen in the shadow DOM until the IME is finished, at which stage its "output" is handed over to the app through an intention event (and the caret element is removed again)?

If that is correct understood, what happens if you are typing in the middle of a text node such as:
'....'<caret/>'.....' ? It will simply split the text node? What's the advantage to invoking the Shadow DOM in this case?



---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/57#issuecomment-106159459

Received on Thursday, 28 May 2015 03:31:52 UTC