mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #2361 - Base implementation of Navigator.Clipboard
This hard-refuses any reads from clipboard with a promise rejection.
This commit is contained in:
parent
c4fdd1d9ee
commit
3478c01fc8
13 changed files with 327 additions and 11 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/Clipboard.h"
|
||||
#ifdef MOZ_GAMEPAD
|
||||
#include "mozilla/dom/GamepadServiceTest.h"
|
||||
#endif
|
||||
|
|
@ -1510,6 +1511,15 @@ Navigator::GetUserAgent(nsPIDOMWindowInner* aWindow, nsIURI* aURI,
|
|||
return siteSpecificUA->GetUserAgentForURIAndWindow(aURI, aWindow, aUserAgent);
|
||||
}
|
||||
|
||||
Clipboard*
|
||||
Navigator::Clipboard()
|
||||
{
|
||||
if (!mClipboard) {
|
||||
mClipboard = new dom::Clipboard(GetWindow());
|
||||
}
|
||||
return mClipboard;
|
||||
}
|
||||
|
||||
#ifdef MOZ_EME
|
||||
static nsCString
|
||||
ToCString(const nsString& aString)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue