nsICookiePromptService 编辑
The nsICookiePromptService
interface is to open a dialog to ask to permission to accept the cookie.
extensions/cookie/nsICookiePromptService.idl
Scriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3)Inherits from: nsISupports
Method overview
long cookieDialog(in |
Constants
Constant | Value | Description |
DENY_COOKIE | 0 | Holds the value for a denying the cookie. |
ACCEPT_COOKIE | 1 | Holds the value for accepting the cookie. |
ACCEPT_SESSION_COOKIE | 2 | Holds the value for accepting the session cookie. |
Methods
cookieDialog()
Opens a dialog that asks for permission to accept a cookie.
long cookieDialog( in nsIDOMWindow parent, in nsICookie cookie, in ACString hostname, in long cookiesFromHost, in boolean changingCookie, out boolean rememberDecision );
Parameters
parent
- The parent window for the dialog.
cookie
- The cookie about which permission is being requested.
hostname
- The host that wants to set the cookie, not the domain; this is part of the cookie.
cookiesFromHost
- The number of cookies there are already for this host.
changingCookie
- Are we changing this cookie?
rememberDecision
- Should we set the matching permission for this host?
Return value
Returns 0
for denying a cookie, 1
for accepting a cookie, and 2
for accepting cookie for the current session only.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论