Initially I found this not to be working:openpgp.verify(options).then(function 
(verified) {
Seems like a bug in IE, document.write does not work in that 
context:http://joji.me/en-us/blog/how-to-resolve-sec7111-https-security-is-compromised-by-null-error-in-ie11
And that is what I happened to use for testing, so I guess, problem fixed!
openpgp.verify(options).then(function (verified) {  /iE
oropenpgp.verify(options).then(verified => {  //Firefox, Chromeand this = this 
:-p
Thanks for your help Tankred

Barry


Subject: Re: [openpgpjs] OpenPGP.js v2.0.0 Test Release
From: [email protected]
Date: Thu, 11 Feb 2016 17:56:28 +0700
To: [email protected]

Hey Barry,
 
thanks for the feedback.
 
> Thanks, I rewrote most of my code to use the new API in half a day or so, and 
> that was pretty painless.
> 
> Also the comments in openpgp.js are very clear, and that combined with the 
> provided
> examples, make it all good.
 
Awesome! Happy to hear the porting is painless.
 
> One issue, looks like Internet Explorer 11 does not like the new API syntax:
> openpgp.verify(options).then(verified => {
> Throws a syntax error on the =>
> 
> Is there a work around for that?
 
The examples use ES6 arrow function syntax:
 
http://exploringjs.com/es6/ch_first-steps.html#_from-function-expressions-to-arrow-functions
 
The OpenPGP.js v2.0 api and some newer parts are written in ES6 but the build 
is transpiled to ES5 using Babel (https://babeljs.io). So that it runs in any 
browser.
 
> Oldish style does not seem to work also
> openpgp.verify(options).then(function(verified) {
> //no error, but also does not work
 
Yeah just use ES5 syntax in your app or check out Babel if you want to use ES6. 
I can only recommend it, as it makes JS programming a lot more productive.
 
Given that ES6 is not yet known by everyone though, I might change the examples 
in the README back to ES5 syntax :/
 
Tankred
 
> Subject: Re: [openpgpjs] OpenPGP.js v2.0.0 Test Release
> From: [email protected]
> Date: Thu, 11 Feb 2016 13:31:54 +0700
> To: [email protected]
> 
> I’ve reworked the README with details on how to get started and added more 
> examples. I hope this helps:
> 
> https://github.com/openpgpjs/openpgpjs/blob/v2.x/README.md
> 
> > Am 11.02.2016 um 07:43 schrieb Tankred Hase <[email protected]>:
> >
> > The api is now completely options based and uses named parameters to be 
> > more extensible. It's now:
> >
> > openpgp.initWorker({ path:'openpgp.worker.js' });
> >
> > I've yet to regenerate to docs. But the openpgp.js file is easy to parse:
> >
> > https://github.com/openpgpjs/openpgpjs/blob/v2.x/src/openpgp.js#L45-L335
> >
> > Am 11.02.2016 um 02:40 schrieb Barry de Graaff <[email protected]>:
> >
> >> Hello Tankred,
> >>
> >> Thanks for the heads-up. So far looks very promising!
> >>
> >> One question, how must one initialize the worker on the v2.0.0-dev?
> >>
> >> I used to:
> >>  openpgp.initWorker('openpgp.worker.js');
> >>
> >> This now throws an error:
> >> Uncaught Error: Unhandled error in openpgp worker: undefined 
> >> (undefined:undefined)AsyncProxy.worker.onerror @ openpgp.js:19158
> >>
> >> Maybe add that to the Readme?
> >>
> >> Thanks,
> >>
> >> Barry
> >> https://github.com/Zimbra-Community/pgp-zimlet
> >>
> >>
> >>
> >> From: [email protected]
> >> Date: Wed, 10 Feb 2016 20:55:02 +0700
> >> To: [email protected]
> >> Subject: [openpgpjs] OpenPGP.js v2.0.0 Test Release
> >>
> >> Hey everyone,
> >>
> >> Version 2.0.0 of OpenPGP.js is almost ready for release and it has a brand 
> >> new api. I’d love your feedback and created a test release so you can play 
> >> around before it’s finalized. You can read the installation instructions 
> >> and all the details on the release here:
> >>
> >> https://github.com/openpgpjs/openpgpjs/pull/406
> >>
> >> Thanks,
> >> Tankred
> >>
> >> _______________________________________________ http://openpgpjs.org 
> >> Subscribe/unsubscribe: http://list.openpgpjs.org
> >> _______________________________________________
> >>
> >> http://openpgpjs.org
> >> Subscribe/unsubscribe: http://list.openpgpjs.org
> 
> 
> _______________________________________________ http://openpgpjs.org 
> Subscribe/unsubscribe: http://list.openpgpjs.org
> _______________________________________________
> 
> http://openpgpjs.org
> Subscribe/unsubscribe: http://list.openpgpjs.org
 

_______________________________________________

http://openpgpjs.org
Subscribe/unsubscribe: http://list.openpgpjs.org                                
          
_______________________________________________

http://openpgpjs.org
Subscribe/unsubscribe: http://list.openpgpjs.org

Reply via email to