Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/@awesome-cordova-plugins/plugins/screenshot/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { AwesomeCordovaNativePlugin, Plugin, getPromise } from '@awesome-cordova-plugins/core';
import { AwesomeCordovaNativePlugin, Plugin, getPromise, CordovaCheck } from '@awesome-cordova-plugins/core';

declare const navigator: any;

Expand Down Expand Up @@ -40,6 +40,7 @@ export class Screenshot extends AwesomeCordovaNativePlugin {
* @param filename {string} Name of the file as stored on the storage
* @returns {Promise<any>}
*/
@CordovaCheck()
save(format?: string, quality?: number, filename?: string): Promise<any> {
return getPromise<any>((resolve, reject) => {
navigator.screenshot.save(
Expand All @@ -64,6 +65,7 @@ export class Screenshot extends AwesomeCordovaNativePlugin {
* Default quality is set to 100.
* @returns {Promise<any>}
*/
@CordovaCheck()
URI(quality?: number): Promise<any> {
return getPromise<any>((resolve, reject) => {
navigator.screenshot.URI((error: any, result: any) => {
Expand Down