sfc-gh-aokrushko commented on code in PR #9701:
URL: https://github.com/apache/nifi/pull/9701#discussion_r1946768878
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts:
##########
@@ -956,7 +956,16 @@ export class CanvasUtils {
return { x, y };
}
+ public isClipboardAvailable(): boolean {
+ // system clipboard interaction requires the browser to be in a
secured context.
+ return window.isSecureContext && Object.hasOwn(window,
'ClipboardItem');
Review Comment:
(outside of the scope for this PR): usually window is wrapped with an
injection token for a few reasons:
- testing
- ssr support (which might be needed in the future)
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts:
##########
@@ -956,7 +956,16 @@ export class CanvasUtils {
return { x, y };
}
+ public isClipboardAvailable(): boolean {
Review Comment:
generally, methods are public by default, and `public` keyword doesn't add
any more info.
https://ts.dev/style/#visibility
I know that it might have been done for the consistency in the file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]