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

New pages: HTMLxElement.cite #36990

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions files/en-us/web/api/htmlmodelement/cite/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "HTMLModElement: cite property"
short-title: cite
slug: Web/API/HTMLModElement/cite
page-type: web-api-instance-property
browser-compat: api.HTMLModElement.cite
---

{{ApiRef("HTML DOM")}}

The **`cite`** property of the {{domxref("HTMLModElement")}} interface indicates the URL of the resource explaining the modification. It reflects the `cite` attribute of the {{HTMLElement("del")}} element and {{HTMLElement("ins")}} elements.

## Value

A string representing a URL.

## Example

```js
const mod = document.querySelector("edit");
console.log(`Explanation: ${mod.cite}`); // the current value
mod.cite = "https://example.com/edits"; // updates the element's cite
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLModElement.dateTime")}}
- {{domxref("HTMLQuoteElement.cite")}}
36 changes: 36 additions & 0 deletions files/en-us/web/api/htmlquoteelement/cite/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "HTMLQuoteElement: cite property"
short-title: cite
slug: Web/API/HTMLQuoteElement/cite
page-type: web-api-instance-property
browser-compat: api.HTMLQuoteElement.cite
---

{{ApiRef("HTML DOM")}}

The **`cite`** property of the {{domxref("HTMLQuoteElement")}} interface indicates the URL for the source of the quotation.. It reflects the {{HTMLElement("q")}} element's [`cite`](/en-US/docs/Web/HTML/Element/q#cite) attribute.

## Value

A string representing a URL.

## Example

```js
const quote = document.querySelector("q");
console.log(`Original source: ${quote.cite}`); // the current value
quote.cite = "https://example.com/quotes"; // updates the value
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLQuoteElement")}}
- {{domxref("HTMLModElement.cite")}}