// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // https://github.com/WICG/digital-goods/blob/main/explainer.md [ SecureContext, RuntimeEnabled=DigitalGoods ] interface DigitalGoodsService { [CallWith=ScriptState, MeasureAs=DigitalGoodsGetDetails] Promise> getDetails(sequence itemIds); [CallWith=ScriptState, MeasureAs=DigitalGoodsListPurchases] Promise> listPurchases(); [CallWith=ScriptState, MeasureAs=DigitalGoodsListPurchaseHistory, RuntimeEnabled=DigitalGoodsV2_1] Promise> listPurchaseHistory(); [CallWith=ScriptState, MeasureAs=DigitalGoodsConsume] Promise consume(DOMString purchaseToken); };