Skip to content

Commit

Permalink
Add docs for HTMLEmbedElement.src (#33553)
Browse files Browse the repository at this point in the history
* add docs

* fix
  • Loading branch information
skyclouds2001 committed May 13, 2024
1 parent 736da09 commit a0460b9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions files/en-us/web/api/htmlembedelement/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "HTMLEmbedElement: src property"
short-title: src
slug: Web/API/HTMLEmbedElement/src
page-type: web-api-instance-property
browser-compat: api.HTMLEmbedElement.src
---

{{APIRef("HTML DOM")}}

The **`src`** property of the {{domxref("HTMLEmbedElement")}} interface returns a string that indicates the URL of the resource being embedded.

It reflects the `src` attribute of the {{HTMLElement("embed")}} element.

## Value

A string.

## Examples

```html
<embed
id="el"
type="video/quicktime"
src="movie.mov"
width="640"
height="480"
title="Title of my video" />
```

```js
const el = document.getElementById("el");
console.log(el.src); // Output: "movie.mov"
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

0 comments on commit a0460b9

Please sign in to comment.