From 34ac579f326521f9739c709fb976c9f9151f3965 Mon Sep 17 00:00:00 2001 From: John Delaney <40465606+johnivdel@users.noreply.github.com> Date: Tue, 4 May 2021 14:57:48 -0400 Subject: [PATCH 1/4] Update element monkey patch with content attributes Includes the list of content attributes to add, and specifies that they must be reflected from the idl attributes --- index.bs | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/index.bs b/index.bs index 3221e11130..d40b8d61da 100644 --- a/index.bs +++ b/index.bs @@ -49,29 +49,45 @@ conversion domain. # HTML monkeypatches # {#html-monkeypatches} -Add the following content attributes to the <{a}> element: +Add the following content attributes to the <{a}> element: + +: <{a/attributionsourceeventid}> +:: Identifies the declared attribution source +: <{a/attributiondestination}> +:: Site which can attribute an event to the declared attribution source +: <{a/attributionreportto}> +:: [=url/origin=] to receive attribution reports +: <{a/attributionexpiry}> +:: Length of time the attribution souce is valid + +Extend <{a}> element DOM interface to include the following interface:
partial interface HTMLAnchorElement { - [CEReactions, Reflect] attribute DOMString attributiondestination; - [CEReactions, Reflect] attribute DOMString attributionsourceeventid; - [CEReactions, Reflect] attribute DOMString attributionreportto; - [CEReactions, Reflect] attribute unsigned long long attributionexpiry; + [CEReactions] attribute DOMString attributiondestination; + [CEReactions] attribute DOMString attributionsourceeventid; + [CEReactions] attribute DOMString attributionreportto; + [CEReactions] attribute DOMString attributionexpiry; };-The attributiondestination is an [=url/origin=] -that is intended to be [=same site=] with the origin of the final navigation url resulting -from running follow the hyperlink with the <{a}> element. +The IDL attributes {{HTMLAnchorElement/attributiondestination}}, {{HTMLAnchorElement/attributionsourceeventid}}, +{{HTMLAnchorElement/attributionreportto}}, {{HTMLAnchorElement/attributionexpiry}} +must reflect the respective content attributes of the same name. + +The attributiondestination attribute is a string +representing an [=url/origin=] that is intended to be [=same site=] with the origin +of the final navigation url resulting from running follow the hyperlink +with the <{a}> element. -The attributionsourceeventid is a string +The attributionsourceeventid attribute is a string containing information about the `attribution source` and will be supplied in the [=attribution report=]. -The attributionreportto optionally declares the +The attributionreportto attribute optionally declares the [=origin=] to send the [=attribution report=] for this source. -The attributionexpiry optionally defines the amount +The attributionexpiry attribute optionally defines the amount of time in milliseconds the attribution source should be considered for reporting. Issue: Need monkey patches passing attribution source in navigation, and a mechanism From ed5251ab23825a433ab0baac3d40faa06f86a553 Mon Sep 17 00:00:00 2001 From: John Delaney <40465606+johnivdel@users.noreply.github.com> Date: Tue, 4 May 2021 17:17:39 -0400 Subject: [PATCH 2/4] Update index.bs Co-authored-by: Jeffrey Yasskin
partial interface HTMLAnchorElement { From 14af137bca9a85b77b9d1b4fd76209f6218f8cbe Mon Sep 17 00:00:00 2001 From: John Delaney <40465606+johnivdel@users.noreply.github.com> Date: Thu, 6 May 2021 22:47:44 -0400 Subject: [PATCH 3/4] Update index.bs --- index.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 764fb99ef6..4a134fa7b4 100644 --- a/index.bs +++ b/index.bs @@ -64,15 +64,15 @@ Extend the <{a}> element's DOM interface to include the followiThe IDL attributes {{HTMLAnchorElement/attributionDestination}}, {{HTMLAnchorElement/attributionSourceEventId}}, -{{HTMLAnchorElement/attributionReportTo}}, {{HTMLAnchorElement/attributionExpiry}} -must reflect the respective content attributes of the same name. +{{HTMLAnchorElement/attributionReportTo}} must reflect the respective content +attributes of the same name. + +The IDL attribute {{HTMLAnchorElement/attributionExpiry}} must reflect the <{a/attributionexpiry}> +content attribute, [=limited to only non-negative numbers=]. The attributiondestination attribute is a string representing an [=url/origin=] that is intended to be [=same site=] with the originpartial interface HTMLAnchorElement { - [CEReactions] attribute DOMString attributiondestination; - [CEReactions] attribute DOMString attributionsourceeventid; - [CEReactions] attribute DOMString attributionreportto; - [CEReactions] attribute DOMString attributionexpiry; + [CEReactions] attribute DOMString attributionDestination; + [CEReactions] attribute DOMString attributionSourceEventId; + [CEReactions] attribute DOMString attributionReportTo; + [CEReactions] attribute long long attributionExpiry; };-The IDL attributes {{HTMLAnchorElement/attributiondestination}}, {{HTMLAnchorElement/attributionsourceeventid}}, -{{HTMLAnchorElement/attributionreportto}}, {{HTMLAnchorElement/attributionexpiry}} +The IDL attributes {{HTMLAnchorElement/attributionDestination}}, {{HTMLAnchorElement/attributionSourceEventId}}, +{{HTMLAnchorElement/attributionReportTo}}, {{HTMLAnchorElement/attributionExpiry}} must reflect the respective content attributes of the same name. The attributiondestination attribute is a string From 079db6f6c3b64501af37f9f0588c33d8cc2fede3 Mon Sep 17 00:00:00 2001 From: John Delaney <40465606+johnivdel@users.noreply.github.com> Date: Wed, 19 May 2021 13:26:23 -0400 Subject: [PATCH 4/4] Update index.bs --- index.bs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 4a134fa7b4..5294fe1841 100644 --- a/index.bs +++ b/index.bs @@ -49,6 +49,28 @@ conversion domain. # HTML monkeypatches # {#html-monkeypatches} +long long reflection
+ +Add the following rules for reflecting content attributes: + +If a reflecting IDL attribute has a signed integer type ({{long long}}) then, on getting, the content attribute must be +parsed according to the rules for parsing integers, and if that is successful, and the value is in the +range of the IDL attribute's type, the resulting value must be returned. If, on the other hand, it fails or returns +an out of range value, or if the attribute is absent, then the default value must be returned instead, or 0 if there +is no default value. On setting, the given value must be converted to the shortest possible string representing the +number as a valid integer and then that string must be used as the new content attribute value. + +If a reflecting IDL attribute has a signed integer type ({{long long}}) that is limited to only non-negative numbers then, +on getting, the content attribute must be parsed according to the rules for parsing non-negative integers, and if +that is successful, and the value is in the range of the IDL attribute's type, the resulting value must be returned. +If, on the other hand, it fails or returns an out of range value, or if the attribute is absent, the default value +must be returned instead, or −1 if there is no default value. On setting, if the value is negative, the user agent +must throw an {{"IndexSizeError"}} {{DOMException}}. Otherwise, the given value must be converted to the shortest possible +string representing the number as a valid non-negative integer and then that string must be used as the new content +attribute value. + +<a> element
+ Add the following content attributes to the <{a}> element: : <{a/attributionsourceeventid}> @@ -72,8 +94,11 @@ partial interface HTMLAnchorElement {