Skip to content

Commit 62d6c56

Browse files
execCommand() feature (#2641)
* execCommand() feature * add execCommand spec * Better description * Minor change to the description
1 parent e7c017e commit 62d6c56

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

features/execcommand.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: execCommand()
2+
description: The `execCommand()` method reads and writes from the clipboard and performs editing commands on editable text, such as changing the font name or style. Related methods check whether commands are supported, enabled, or applied.
3+
spec: https://w3c.github.io/editing/docs/execCommand/
4+
group: clipboard
5+
discouraged:
6+
according_to:
7+
- https://w3c.github.io/editing/docs/execCommand/
8+
alternatives:
9+
- async-clipboard
10+
- contenteditable
11+
compat_features:
12+
- api.Document.execCommand
13+
- api.Document.execCommand.copy
14+
- api.Document.execCommand.cut
15+
- api.Document.execCommand.defaultParagraphSeparator
16+
- api.Document.execCommand.insertBrOnReturn
17+
- api.Document.queryCommandEnabled
18+
- api.Document.queryCommandIndeterm
19+
- api.Document.queryCommandState
20+
- api.Document.queryCommandSupported
21+
- api.Document.queryCommandValue

features/execcommand.yml.dist

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Generated from: execcommand.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
firefox: "69"
8+
firefox_android: "79"
9+
compat_features:
10+
# baseline: false
11+
# support:
12+
# chrome: "1"
13+
# chrome_android: "18"
14+
# edge: "12"
15+
# firefox: "69"
16+
# firefox_android: "79"
17+
# safari: "1.3"
18+
# safari_ios: "1"
19+
- api.Document.execCommand
20+
21+
# baseline: false
22+
# support:
23+
# chrome: "1"
24+
# chrome_android: "18"
25+
# edge: "12"
26+
# firefox: "69"
27+
# firefox_android: "79"
28+
# safari: "2"
29+
# safari_ios: "1"
30+
- api.Document.queryCommandEnabled
31+
- api.Document.queryCommandIndeterm
32+
- api.Document.queryCommandState
33+
- api.Document.queryCommandSupported
34+
- api.Document.queryCommandValue
35+
36+
# baseline: false
37+
# support:
38+
# chrome: "42"
39+
# chrome_android: "42"
40+
# edge: "12"
41+
# firefox: "69"
42+
# firefox_android: "79"
43+
# safari: "10"
44+
# safari_ios: "10"
45+
- api.Document.execCommand.copy
46+
- api.Document.execCommand.cut
47+
48+
# ⬇️ Same status as overall feature ⬇️
49+
# baseline: false
50+
# support:
51+
# firefox: "69"
52+
# firefox_android: "79"
53+
- api.Document.execCommand.defaultParagraphSeparator
54+
- api.Document.execCommand.insertBrOnReturn

scripts/specs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ const defaultAllowlist: allowlistItem[] = [
108108
[
109109
"https://www.w3.org/TR/DOM-Level-2-Style/",
110110
"Allowed because the css-object-model-discouraged feature points to it."
111+
],
112+
[
113+
"https://w3c.github.io/editing/docs/execCommand/",
114+
"Allowed because the execCommand feature points to it, to inform users that the feature is obsolete. The spec exists in a draft state only and will never move out of draft. It serves as a reference."
111115
]
112116
];
113117

0 commit comments

Comments
 (0)