Skip to content

Commit

Permalink
Allow attributionsrc on <a /> (ampproject#38652)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcordry authored Jan 26, 2023
1 parent c95dcde commit 2c147a9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
Test Description:
Enable the attribution reporting API for anchor elements
https://github.com/WICG/attribution-reporting-api/blob/main/EVENT.md#api-overview
-->
<!doctype html>
<html ⚡4ads>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style amp4ads-boilerplate>body{visibility:hidden}</style>
<script async src="https://cdn.ampproject.org/amp4ads-v0.js"></script>
</head>
<body>
Hello, world.
<a attributionsrc></a>
<a attributionsrc="https://adtech.example"></a>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PASS
| <!--
| Test Description:
| Enable the attribution reporting API for anchor elements
| https://github.com/WICG/attribution-reporting-api/blob/main/EVENT.md#api-overview
| -->
| <!doctype html>
| <html ⚡4ads>
| <head>
| <meta charset="utf-8">
| <meta name="viewport" content="width=device-width,minimum-scale=1">
| <style amp4ads-boilerplate>body{visibility:hidden}</style>
| <script async src="https://cdn.ampproject.org/amp4ads-v0.js"></script>
| </head>
| <body>
| Hello, world.
| <a attributionsrc></a>
| <a attributionsrc="https://adtech.example"></a>
| </body>
| </html>
7 changes: 7 additions & 0 deletions validator/validator-main.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,13 @@ tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "A"
attrs: {
name: "attributionsrc"
value_url: {
protocol: "https"
allow_empty: true
}
}
attrs: { name: "border" } # Not valid html5 but commonly used and supported.
attrs: { name: "download" }
attrs: {
Expand Down

0 comments on commit 2c147a9

Please sign in to comment.