[Webkit-unassigned] [Bug 227016] New: Document.queryCommandSupported behaves differently from Chrome and Firefox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 23:10:17 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227016

            Bug ID: 227016
           Summary: Document.queryCommandSupported behaves differently
                    from Chrome and Firefox
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zyscoder at gmail.com

Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Open Devtools and run the following code in the Console:
```
new Document().queryCommandSupported('str');
```
Actual results:

This code would be evaluated successfully and return a value of false, without throwing any exceptions.

Expected results:

Both in Chrome and Firefox throw expcetions:
Chrome: `DOMException: Failed to execute 'queryCommandSupported' on 'Document': queryCommandSupported is only supported on HTML documents.`
Firefox: `queryCommandSupported is only supported on HTML documents.`
It seems better to align with Chrome and Firefox.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210615/4b57e293/attachment.htm>


More information about the webkit-unassigned mailing list