nsIFrameLoader 编辑

content/base/public/nsIFrameLoader.idlScriptable 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

AttributeTypeDescription
delayRemoteDialogsboolean
depthTooGreatbooleanFind 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.
docShellnsIDocShellGet the docshell from the frame loader. Read only.
messageManagernsIChromeFrameMessageManagerThe 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

词条统计

浏览:94 次

字数:9564

最后编辑:8年前

编辑次数:0 次

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