From 6b4972918eeed0b1860c931b53f1976cb43f0476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Tue, 12 Feb 2019 12:26:53 +0100 Subject: [PATCH] Update docs --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c8a084..ee56421 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,13 @@ Plugin for [Cordova][cordova] to print documents or photos from iOS, Android and The plugin creates the object `cordova.plugins.printer` and is accessible after the *deviceready* event has been fired. -To print a screenshot of the app: +```js +document.addEventListener('deviceready', function () { + // cordova.plugins.printer is now available +}, false); +``` + +Print a screenshot of the web view: ```javascript cordova.plugins.printer.print();