Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | /**
|
---|
9 | * A pending copy-to-clipboard operation.
|
---|
10 | *
|
---|
11 | * The implementation of copying text to the clipboard modifies the DOM and
|
---|
12 | * forces a relayout. This relayout can take too long if the string is large,
|
---|
13 | * causing the execCommand('copy') to happen too long after the user clicked.
|
---|
14 | * This results in the browser refusing to copy. This object lets the
|
---|
15 | * relayout happen in a separate tick from copying by providing a copy function
|
---|
16 | * that can be called later.
|
---|
17 | *
|
---|
18 | * Destroy must be called when no longer in use, regardless of whether `copy` is
|
---|
19 | * called.
|
---|
20 | */
|
---|
21 | export declare class PendingCopy {
|
---|
22 | private readonly _document;
|
---|
23 | private _textarea;
|
---|
24 | constructor(text: string, _document: Document);
|
---|
25 | /** Finishes copying the text. */
|
---|
26 | copy(): boolean;
|
---|
27 | /** Cleans up DOM changes used to perform the copy operation. */
|
---|
28 | destroy(): void;
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.