Update comment on getClipboardText
This commit is contained in:
parent
dec7f6cabb
commit
024f969bfd
@ -286,8 +286,10 @@ class DisplaySearch extends Display {
|
|||||||
async getClipboardText() {
|
async getClipboardText() {
|
||||||
/*
|
/*
|
||||||
Notes:
|
Notes:
|
||||||
apiClipboardGet doesn't work on firefox because document.execCommand('paste') requires
|
apiClipboardGet doesn't work on Firefox because document.execCommand('paste')
|
||||||
user interaction. Therefore, navigator.clipboard.readText() is used.
|
results in an empty string on the web extension background page.
|
||||||
|
This may be a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1603985
|
||||||
|
Therefore, navigator.clipboard.readText() is used on Firefox.
|
||||||
|
|
||||||
navigator.clipboard.readText() can't be used in Chrome for two reasons:
|
navigator.clipboard.readText() can't be used in Chrome for two reasons:
|
||||||
* Requires page to be focused, else it rejects with an exception.
|
* Requires page to be focused, else it rejects with an exception.
|
||||||
|
Loading…
Reference in New Issue
Block a user