nsIFrameLoader

Handles loading a frame.
1.0
66
Introduced
Gecko 1.8
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Note: This interface works in tandem with the nsIContentView interface to manage frames across processes if Electrolysis is in use to support per-frame processes.

Method overview

void activateFrameEvent(in AString aType, in boolean capture);
void activateRemoteFrame();
void destroy();
void loadFrame();
void loadURI(in nsIURI aURI);
void sendCrossProcessKeyEvent(in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in boolean aPreventDefault);
void sendCrossProcessMouseEvent(in AString aType, in float aX, in float aY, in long aButton, in long aClickCount, in long aModifiers, [optional] in boolean aIgnoreRootScrollFrame);
void updatePositionAndSize(in nsIFrame aIFrame); Native code only!

Attributes

Attribute Type Description
delayRemoteDialogs boolean
depthTooGreat boolean Find out whether the loader's frame is at too great a depth in the frame tree. This can be used to decide what operations may or may not be allowed on the loader's docshell. Read only.
docShell nsIDocShell Get the docshell from the frame loader. Read only.
messageManager nsIChromeFrameMessageManager The message manager handling messages for this frame. Read only.

Methods

activateFrameEvent()

Activates event forwarding from client (remote frame) to parent.

void activateFrameEvent(
  in AString aType,
  in boolean capture
);
Parameters
aType
The event type for which to enable forwarding.
capture
Whether or not to capture these events.

activateRemoteFrame()

Activates the remote frame.

void activateRemoteFrame();
Parameters

None.

Exceptions thrown

Throws an exception with non-remote frames.

destroy()

Destroys the frame loader and everything inside it. This will clear the weak owner content reference.

void destroy();
Parameters

None.

loadFrame()

Starts loading the frame. This method figures out what to load from the owner content in the frame loader.

void loadFrame();
Parameters

None.

loadURI()

Loads the specified URI in this frame. Behaves identically to loadFrame(), except that this method lets you specify the URI to load.

void loadURI(
  in nsIURI aURI
);
Parameters
aURI
The URI to load into the frame.

sendCrossProcessKeyEvent()

Creates and sends a KeyEvent to the content viewport's process. See nsIDOMWindowUtils.sendKeyEvent() for details; this method is its equivalent for cross-process event handling.

void sendCrossProcessKeyEvent(
  in AString aType,
  in long aKeyCode,
  in long aCharCode,
  in long aModifiers,
  [optional] in boolean aPreventDefault
);
Parameters
aType
The event type.
aKeyCode
The key code.
aCharCode
The character code.
aModifiers
The modifier flags.
aPreventDefault
Whether or not to prevent default actions from being performed.

sendCrossProcessMouseEvent()

Creates and sends a MouseEvent to the content viewport's process. See nsIDOMWindowUtils.sendMouseEvent() for details; this method is its equivalent for cross-process event handling.

void sendCrossProcessMouseEvent(
  in AString aType,
  in float aX,
  in float aY,
  in long aButton,
  in long aClickCount,
  in long aModifiers,
  [optional] in boolean aIgnoreRootScrollFrame
);
Parameters
aType
The type of mouse event to send.
aX
The X coordinate of the mouse.
aY
The Y coordinate of the mouse.
aButton
Which button was clicked, if any.
aClickCount
The number of clicks comprising the mouse button event, if any.
aModifiers
The modifier keys in effect at the time of the event.
aIgnoreRootScrollFrame Optional
Whether or not to ignore the root scroll frame.

Native code only!

updatePositionAndSize

Updates the position and size of the subdocument loaded by this frameloader.

void updatePositionAndSize(
  in nsIFrame aIFrame
);
Parameters
aIFrame
The nsIFrame for the content node that owns this frameloader.

See also