nsITextInputProcessorNotification

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.