зеркало из https://github.com/mozilla/gecko-dev.git
68 строки
2.1 KiB
Plaintext
68 строки
2.1 KiB
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
#include "nsISerializable.idl"
|
|
|
|
interface nsIURI;
|
|
webidl Document;
|
|
webidl Node;
|
|
|
|
native URIRef(already_AddRefed<nsIURI>);
|
|
|
|
[scriptable, builtinclass, uuid(081cdc36-f2e2-4f94-87bf-78578f06f1eb)]
|
|
interface nsIReferrerInfo : nsISerializable
|
|
{
|
|
/**
|
|
* The original referrer URI which indicates the full referrer before applying
|
|
* referrer policy
|
|
*/
|
|
[infallible] readonly attribute nsIURI originalReferrer;
|
|
|
|
/**
|
|
* Referrer policy which is applied to the referrer
|
|
*/
|
|
[infallible] readonly attribute unsigned long referrerPolicy;
|
|
|
|
/**
|
|
* Indicates if the referrer should not be sent or not even when it's available.
|
|
*/
|
|
[infallible] readonly attribute boolean sendReferrer;
|
|
|
|
/**
|
|
* Get the computed referrer, if one has been set. The computed referrer is
|
|
* the original referrer manipulated by the referrer-policy. Use the result of
|
|
* this function as the actual referrer value for the channel.
|
|
*/
|
|
|
|
[must_use, noscript, nostdcall, notxpcom]
|
|
URIRef GetComputedReferrer();
|
|
|
|
/**
|
|
* Initialize method.
|
|
* @param aReferrerPolicy referrer policy of the created object
|
|
* @param aSendReferrer sendReferrer of the created object, defaults to false
|
|
* @param aOriginalReferrer the original referrer, defaults to null.
|
|
*/
|
|
void init(in uint32_t aReferrerPolicy,
|
|
[optional] in boolean aSendReferrer,
|
|
[optional] in nsIURI aOriginalReferrer);
|
|
|
|
/**
|
|
* Initialize with a given document.
|
|
* @param aDocument the document to init referrerInfo object
|
|
*/
|
|
void initWithDocument(in Document aDocument);
|
|
|
|
/**
|
|
* Initialize with a given node. It you are working with node which supports
|
|
* referrerpolicy attribute: <a>, <img>, <area>, <script>, <iframe>, please
|
|
* try to use this init instead of initWithDocument, because referrer policy
|
|
* from rel and attribute has a higher priority.
|
|
* @param aNode the element to init referrerInfo object
|
|
*/
|
|
void initWithNode(in Node aNode);
|
|
|
|
};
|