WebExtensions: no method to clear the clipboard from the background script

RESOLVED DUPLICATE of bug 1344410

Status

WebExtensions
Untriaged
P5
normal
RESOLVED DUPLICATE of bug 1344410
a year ago
3 days ago

People

(Reporter: AuroraBorealis, Unassigned)

Tracking

53 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: triaged)

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 10.0; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170504105526

Steps to reproduce:

In th addon background script called:

document.execCommand(clear)


Actual results:

the clipboard was not cleared


Expected results:

The "document.execCommand()" of the API has to be extended by a parameter "clear". This command will clear the global clipboard only from the background script, like the method "emptyClipboard" from the "nsIClipboard" interface with the argument "nsIClipboard.kGlobalClipboard"

Updated

a year ago
Flags: needinfo?(amckay)
Priority: -- → P5
Whiteboard: triaged

Comment 1

a year ago
Where is document.execCommand("clear") documented? I can't see anything about on MDN. I think you are suggesting we add it?

Rather than adding in a WebAPI, I'd rather go with an explicit API to the clipboard API as suggested by bug 134410. If that gets implemented, something like browser.clipboard.clear, would be equivalent (perhaps) to browser.clipboard.set(null) (or whatever the API is).

If that's the case, I'd rather dupe this to that bug.
Flags: needinfo?(amckay) → needinfo?(aurora2borealis)
(Reporter)

Comment 2

a year ago
Hi,

> I think you are suggesting we add it?

thats right.

> ... as suggested by bug 134410. 

I cant see that this bug is in any way related to my report.

> If that gets implemented, something like browser.clipboard.clear ...

that would be sufficient. For what firefox release do you expect the implementation?

Best regards

Dipl.-Ing. M. Türschmann
Flags: needinfo?(aurora2borealis)

Comment 3

a year ago
Sorry, I mis-typed the bug number, please see bug 1344410. 

I'm going to dupe this to that bug. That bug is currently unassigned and looking for a contributor to work on, so there is currently no scheduled plan for that to land.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1344410

Updated

3 days ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.