nsITextInputProcessorNotification 编辑
dom/interfaces/base/nsITextInputProcessorCallback.idl
Scriptable This interface of a request or notification to IME 1.0 66 Introduced Gecko 38 Inherits from: nsISupports
Last changed in Gecko 38.0 (Firefox 38.0 / Thunderbird 38.0 / SeaMonkey 2.35)This interface tells details of a request or notification to IME. When Gecko supports new notification to IME, this interface may have some new attributes. So, nsITextInputProcessorCallback
won't be changed for keeping backward compatibility.
Attributes
Attribute | Type | Description |
---|---|---|
type | ACString | The type of request or notification to IME. See type values below. |
Types
"request-to-commit"
This is required to be handled.
When this is requested, the callback should commit composition synchronously, i.e., nsITextInputProcessor.commitComposition() should be called.
If the callback doesn't want to commit the composition synchronously, it's okay to commit it later (i.e., asynchronously). However, Gecko will commit the composition with the last composing string internally.
This is typically notified when user clicks somewhere, focus is moved, or web contents modify the value of the editor during composition.
"request-to-cancel"
This is required to be handled.
When this is requested, the callback should cancel composition synchronously, i.e., nsITextInputProcessor.cancelComposition() should be called.
If the callback doesn't want to cancel the composition synchronously, it's okay to cancel it later (i.e., asynchronously). However, Gecko will cancel the composition with empty string internally.
This is typically notified when the editor is being removed from the DOM tree during composition.
"notify-detached"
When the nsITextInputProcessor instance loses the rights to create composition, this is notified.
"notify-focus"
When an editable editor gets focus, this is notified.
"notify-blur"
When an editable editor loses focus, this is notified.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论