Web IDLでSecure contextsのみで使えるフィールドの属性
[SecureContext]属性
以下は例。
code:widl
interface ExampleFeature {
// This call will succeed in all contexts.
Promise <double> calculateNotSoSecretResult();
// This operation will not be exposed to a non-secure context.
// The same applies here: the operation will not be exposed to a non-secure context.
};
interface SecureFeature {
// This interface will not be exposed to non-secure contexts.
Promise<any> doAmazingThing();
};
code:widl
interface SubtleCrypto {
Promise<any> encrypt(AlgorithmIdentifier algorithm,
...
};