nsIClipboardCommands 编辑

webshell/public/nsIClipboardCommands.idlScriptable An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface. Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

boolean canCopyImageContents();
boolean canCopyImageLocation();
boolean canCopyLinkLocation();
boolean canCopySelection();
boolean canCutSelection();
boolean canPaste();
void copyImageContents();
void copyImageLocation();
void copyLinkLocation();
void copySelection();
void cutSelection();
void paste();
void selectAll();
void selectNone();

Methods

canCopyImageContents()

Returns whether we can copy an image's contents.

boolean canCopyImageContents();
Parameters

None.

Return value

true if an image is selected, false otherwise.

canCopyImageLocation()

Returns whether we can copy an image location.

boolean canCopyImageLocation();
Parameters

None.

Return value

true if an image is selected, false otherwise.

canCopyLinkLocation()

Returns whether we can copy a link location.

boolean canCopyLinkLocation();
Parameters

None.

Return value

true if a link is selected, false otherwise.

canCopySelection()

Returns whether there is a selection and it is copyable.

boolean canCopySelection();
Parameters

None.

Return value

true if there is a selection, false otherwise.

canCutSelection()

Returns whether there is a selection and it is not read-only.

boolean canCutSelection();
Parameters

None.

Return value

true if the current selection can be cut, false otherwise.

canPaste()

Returns whether the current contents of the clipboard can be pasted and if the current selection is not read-only.

boolean canPaste();
Parameters

None.

Return value

true if there is data to paste on the clipboard and the current selection is not read-only, false otherwise.

copyImageContents()

Copy the contents of the selected image.

void copyImageContents();
Parameters

None.

copyImageLocation()

Copy the location of the selected image.

void copyImageLocation();
Parameters

None.

copyLinkLocation()

Copy the link location of the current selection (For example the |href| attribute of a selected |a| tag).

void copyLinkLocation();
Parameters

None.

copySelection()

Copy the current selection onto the clipboard.

void copySelection();
Parameters

None.

cutSelection()

Cut the current selection onto the clipboard.

void cutSelection();
Parameters

None.

paste()

Paste the contents of the clipboard into the current selection.

void paste();
Parameters

None.

selectAll()

Select the entire contents.

void selectAll();
Parameters

None.

selectNone()

Clear the current selection (if any). Insertion point ends up at beginning of current selection.

void selectNone();
Parameters

None.

See also

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

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

发布评论

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

词条统计

浏览:77 次

字数:7687

最后编辑:7 年前

编辑次数:0 次

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