Apply strictNullChecks to src/async-components/* (#10251
* Apply strictNullChecks to src/async-components/* * Iterate
This commit is contained in:
parent
629e5cb01f
commit
8ad21e6492
7 changed files with 57 additions and 43 deletions
|
@ -70,7 +70,8 @@ export function selectText(target: Element): void {
|
|||
* In certain browsers it may only work if triggered by a user action or may ask user for permissions
|
||||
* @param ref pointer to the node to copy
|
||||
*/
|
||||
export function copyNode(ref: Element): boolean {
|
||||
export function copyNode(ref?: Element | null): boolean {
|
||||
if (!ref) return false;
|
||||
selectText(ref);
|
||||
return document.execCommand("copy");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue