diff --git a/index.bs b/index.bs index 3221e11130..5294fe1841 100644 --- a/index.bs +++ b/index.bs @@ -49,29 +49,70 @@ conversion domain. # HTML monkeypatches # {#html-monkeypatches} -Add the following content attributes to the <{a}> element: +

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}> +:: 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 the <{a}> element's 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 long long 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}} 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 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