PrivateAttribution.webidl (1066B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 enum PrivateAttributionImpressionType { "view", "click" }; 7 8 dictionary PrivateAttributionImpressionOptions { 9 PrivateAttributionImpressionType type = "view"; 10 required unsigned long index; 11 required DOMString ad; 12 required UTF8String target; 13 }; 14 15 dictionary PrivateAttributionConversionOptions { 16 required DOMString task; 17 required unsigned long histogramSize; 18 19 unsigned long lookbackDays; 20 PrivateAttributionImpressionType impression; 21 sequence<DOMString> ads = []; 22 sequence<UTF8String> sources = []; 23 }; 24 25 [Trial="PrivateAttributionV2", SecureContext, Exposed=Window] 26 interface PrivateAttribution { 27 [Throws] undefined saveImpression(PrivateAttributionImpressionOptions options); 28 [Throws] undefined measureConversion(PrivateAttributionConversionOptions options); 29 };