File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,10 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
171
171
document . createElement = newCreateElement ;
172
172
173
173
class Clipboard {
174
- public has ( ) : boolean {
175
- return false ;
174
+ private readonly buffers = new Map < string , Buffer > ( ) ;
175
+
176
+ public has ( format : string ) : boolean {
177
+ return this . buffers . has ( format ) ;
176
178
}
177
179
178
180
public readFindText ( ) : string {
@@ -190,6 +192,14 @@ class Clipboard {
190
192
public readText ( ) : Promise < string > {
191
193
return clipboard . readText ( ) ;
192
194
}
195
+
196
+ public writeBuffer ( format : string , buffer : Buffer ) : void {
197
+ this . buffers . set ( format , buffer ) ;
198
+ }
199
+
200
+ public readBuffer ( format : string ) : Buffer | undefined {
201
+ return this . buffers . get ( format ) ;
202
+ }
193
203
}
194
204
195
205
class Shell {
You can’t perform that action at this time.
0 commit comments