-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
56 lines (41 loc) · 1.1 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: StylePropertyMap.delete()
slug: Web/API/StylePropertyMap/delete
page-type: web-api-instance-method
tags:
- API
- CSS Typed Object Model API
- Houdini
- Method
- Reference
- StylePropertyMap
- delete()
browser-compat: api.StylePropertyMap.delete
---
{{APIRef("CSS Typed Object Model API")}}{{SeeCompatTable}}
The **`delete()`** method of the
{{domxref("StylePropertyMap")}} interface removes the CSS declaration with the given
property.
## Syntax
```js
delete(property)
```
### Parameters
- `property`
- : An identifier indicating the stylistic feature (e.g. font, width, background
color) to remove.
### Return value
None ({{jsxref("undefined")}}).
## Examples
The following example removes the {{cssxref('background-image')}} property from the
element's [style attribute](/en-US/docs/Web/HTML/Global_attributes/style).
```js
// get the button element
const buttonEl = document.querySelector('button');
// remove background-image from style attribute
buttonEl.attributeStyleMap.delete('background-image');
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}