Interface nsIAppShellType

Interface for the native event system layer. This interface is designed to be used on the main application thread only.

Hierarchy

Properties

eventloopNestingLevel: number

The current event loop nesting level.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Exit the handle event loop

    Returns void

  • Ask the native event queue notification mechanism to favor Gecko tasks (instead of native tasks) for a short while. (Content processes always favor Gecko tasks.)

    Returns void

  • Resumes the use of additional platform-specific methods to run Gecko events on the main application thread. Calls to suspendNative() and resumeNative() may be nested. On some platforms this will be a no-op.

    Returns void

  • Enter an event loop. Don't leave until exit() is called.

    Returns void

  • Suspends the use of additional platform-specific methods (besides the nsIAppShell->run() event loop) to run Gecko events on the main application thread. Under some circumstances these "additional methods" can cause Gecko event handlers to be re-entered, sometimes leading to hangs and crashes. Calls to suspendNative() and resumeNative() may be nested. On some platforms (those that don't use any "additional methods") this will be a no-op. Does not (in itself) stop Gecko events from being processed on the main application thread. But if the nsIAppShell->run() event loop is blocked when this call is made, Gecko events will stop being processed until resumeNative() is called (even if a plugin or library is temporarily processing events on a nested event loop).

    Returns void

Generated using TypeDoc