// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // https://wicg.github.io/cookie-store/explainer.html [ Exposed=(ServiceWorker,Window), SecureContext ] interface CookieStore : EventTarget { // https://wicg.github.io/cookie-store/explainer.html#the-query-api [CallWith=ScriptState, Measure, RaisesException] Promise get( USVString name); [CallWith=ScriptState, Measure, RaisesException] Promise get( optional CookieStoreGetOptions options = {}); [CallWith=ScriptState, Measure, RaisesException] Promise getAll( USVString name); [CallWith=ScriptState, Measure, RaisesException] Promise getAll( optional CookieStoreGetOptions options = {}); // https://wicg.github.io/cookie-store/explainer.html#the-modifications-api [CallWith=ScriptState, Measure, RaisesException] Promise set( USVString name, USVString value); [CallWith=ScriptState, Measure, RaisesException] Promise set( CookieInit cookieInit); [CallWith=ScriptState, ImplementedAs=Delete, Measure, RaisesException] Promise delete(USVString name); [CallWith=ScriptState, ImplementedAs=Delete, Measure, RaisesException] Promise delete(CookieStoreDeleteOptions options); // https://wicg.github.io/cookie-store/explainer.html#the-change-events-api [Exposed=Window] attribute EventHandler onchange; };