demo · v144
Ping Beacon Test
Configure an SVG <a>: set ping to a tracking URL, pick a referrer policy, declare type and hreflang. Click it; the demo opens the target in a new tab and (in v144+) Chrome fires the ping beacon. The HTML twin runs alongside for comparison.
SVGAElement IDL: checking…
IDL properties read back
generated markup
beacon log
the API
const svgA = document.querySelector("svg a");
svgA.ping = "https://beacon.example/track"; // new
svgA.hreflang = "en-GB"; // new
svgA.type = "text/html"; // new
svgA.referrerPolicy = "no-referrer"; // new
// firing the link will dispatch a POST to ping and follow href