Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document for HTMLAnchorElement.ping #31904

Merged
merged 7 commits into from
Jan 29, 2024
38 changes: 38 additions & 0 deletions files/en-us/web/api/htmlanchorelement/ping/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "HTMLAnchorElement: ping property"
short-title: ping
slug: Web/API/HTMLAnchorElement/ping
page-type: web-api-instance-property
browser-compat: api.HTMLAnchorElement.ping
---

{{ApiRef("HTML DOM")}}

The **`ping`** property of the {{domxref("HTMLAnchorElement")}} interface is a space-separated list of URLs.
ShubhamOulkar marked this conversation as resolved.
Show resolved Hide resolved

It reflects the `ping` attribute of the {{HTMLElement("a")}} element.

> **Note:** This property is not effective in Firefox and its usage may be limited due to privacy and security concerns.
ShubhamOulkar marked this conversation as resolved.
Show resolved Hide resolved

## Example

```html
<a id="exampleLink" href="https://example.com" ping="https://example-tracking.com">Example Link</a>
ShubhamOulkar marked this conversation as resolved.
Show resolved Hide resolved
```

```js
const anchorElement = document.getElementById("exampleLink");
console.log(anchorElement.ping); // Output: "https://example-tracking.com"
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLAreaElement.ping")}} property
Loading