nsIAnnotationObserver 编辑

toolkit/components/places/public/nsIAnnotationService.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3)

Method overview

void onItemAnnotationRemoved(in long long aItemId, in AUTF8String aName);
void onItemAnnotationSet(in long long aItemId, in AUTF8String aName);
void onPageAnnotationRemoved(in nsIURI aURI, in AUTF8String aName);
void onPageAnnotationSet(in nsIURI aPage, in AUTF8String aName);

Methods

onItemAnnotationRemoved()

This method is called when an annotation is deleted for an item. If aName is empty, then ALL annotations for the given item have been deleted. This is not called when annotations are expired (normally happens when the application exits).

void onItemAnnotationRemoved(
  in long long aItemId,
  in AUTF8String aName
);
Parameters
aItemId
The item whose annotation is to be deleted.
aName
The annotation name.

onItemAnnotationSet()

This method is called when an annotation value is set for an item. It could be a new annotation, or it could be a new value for an existing annotation.

void onItemAnnotationSet(
  in long long aItemId,
  in AUTF8String aName
);
Parameters
aItemId
The item on which the annotation is to be set.
aName
The annotation name.

onPageAnnotationRemoved()

Called when an annotation is deleted for a URI. If aName is empty, then ALL annotations for the given URI have been deleted. This is not called when annotations are expired (normally happens when the application exits).

void onPageAnnotationRemoved(
  in nsIURI aURI,
  in AUTF8String aName
);
Parameters
aURI
The URI whose annotation is to be deleted.
aName
The annotation name.

onPageAnnotationSet()

This method is called when an annotation value is set for a URI. It could be a new annotation, or it could be a new value for an existing annotation.

void onPageAnnotationSet(
  in nsIURI aPage,
  in AUTF8String aName
);
Parameters
aPage
The URI on which the annotation is to be set.
aName
The annotation name.

See also

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

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

发布评论

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

词条统计

浏览:72 次

字数:4519

最后编辑:6 年前

编辑次数:0 次

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