Nasi wolontariusze nie przetłumaczyli jeszcze tego artykułu na język Polski. Dołącz do nas i pomóż go przetłumaczyć!
Można także przeczytać artykuł w języku: English (US).

The Document.queryCommandSupported() method reports whether or not the specified editor command is supported by the browser.

Syntax

isSupported = document.queryCommandSupported(command);

Parameters

command
The command for which to determine support.

Return value

Returns a Boolean which is true if the command is supported and false if the command isn't.

Notes

The 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action [1]

Example

var flg = document.queryCommandSupported("SelectAll");

if(flg) {
  // ...Do something
}

Specifications

Specification Status Comment
HTML Editing APIs
The definition of 'querycommandsupported' in that specification.
Editor's Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 17Edge Full support YesFirefox Full support 41
Full support 41
No support 9 — 41
Notes
Notes paste argument incorrectly returned true when the paste feature was available but the calling script had insufficient privileges to actually perform the action.
IE Full support 4Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 41
Full support 41
No support 9 — 41
Notes
Notes paste argument incorrectly returned true when the paste feature was available but the calling script had insufficient privileges to actually perform the action.
Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also

Autorzy i etykiety dokumentu

Etykiety: 
Ostatnia aktualizacja: fscholz,