Added interface for copying text to clipboard (#12029)

* Added interface for copying text to clipboard

* Bind the context to the function
This commit is contained in:
qiuguohua
2022-07-21 14:55:27 +08:00
committed by GitHub
parent ccb5fb97e0
commit bbfafa4e9a
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -6,4 +6,5 @@ export const native = {
zipUtils: globalJsb.zipUtils,
fileUtils: globalJsb.fileUtils,
DebugRenderer: globalJsb.DebugRenderer,
copyTextToClipboard: globalJsb.copyTextToClipboard?.bind(globalJsb),
};
+6
View File
@@ -36,6 +36,12 @@ export declare namespace native {
*/
export type DownloaderTask = { requestURL: string, storagePath: string, identifier: string };
/**
* @en Copy text to clipboard @zh 拷贝字符串到剪切板
* @param text
*/
export function copyTextToClipboard(text:string): void;
/**
* @en DownloaderHints @zh 下载任务的配置接口
* @param countOfMaxProcessingTasks