From 1f378d5519396f47105cc5008136f921bbed7742 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 23 Jan 2017 16:30:03 -0500 Subject: [PATCH] eg 2017 hatch review doc Signed-off-by: Bill Erickson --- hatch-review.adoc | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/hatch-review.adoc b/hatch-review.adoc index dbd6ed17d..02f93601b 100644 --- a/hatch-review.adoc +++ b/hatch-review.adoc @@ -9,24 +9,27 @@ == Topics +* foo +* bar -== Native Messaging API +== Browser Extension Loading / Debugging https://developer.chrome.com/extensions/nativeMessaging -The Hatch extension -Application passes JavaScript objects to the Hatch extension -Browser passes JSON messages - TODO: screen shot of hatch Icon and permission request dialog. Note perm request only happens. +chrome://extensions/ +Background Page +Reload option == Native Messaging API TODO: Make this an image +One instance of Hatch per browser (not per tab). + Application JavaScript <=> Content Script JavaScript <=> Extension JavaScript @@ -39,17 +42,20 @@ Application JavaScript Sample print message JSON. +egCore.print.print({...}) is translated into: + [source,js] --------------------------------------------------------------------------- { - "action":"print", - "content":"Hello, World!", - "contentType":"text/html", - "showDialog":true, - "msgid":10, - "from":"page", - "clientid":5319, - "origin":"https://eg-dev-local" + "action":"print", + "content":"Hello, World!", + "contentType":"text/html", + "showDialog":true, + "msgid":10, + "from":"page", + "clientid":5319, // set by extension + "origin":"https://eg.example.org", // set by extension + "settings":{"context":"default","printer":"HP-Deskjet-5100", ...} } --------------------------------------------------------------------------- @@ -58,3 +64,12 @@ Sample print message JSON. 1. Settings locations / properties 2. hatch.log +== Alternate Implementations + Challenges + * headless HTML rendering + printing + * printer api (simpler if targeting one OS) + + +== Publish Browser Extension + +* Chrome store -- 2.11.0