nsITextInputProcessorNotification 编辑

dom/interfaces/base/nsITextInputProcessorCallback.idlScriptable 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

AttributeTypeDescription
typeACStringThe 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:18 次

字数:3494

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文