Closed mnoorenberghe closed 8 years ago
I added those CustomEvents to help with some access problem (i think webpage callbacks that did execute JSON.stringify was producing error about toString not being available or something like that). I think that https://demo.yubico.com/u2f was triggering this. But maybe having closures used as port listeners being created in functions that are exportFunction
to page scope will helps with this. Were you able to verify that for example demo.yubico.com/u2f work with that change?
OK, that is the page I test with and it works fine in the cases I tested with. I did see an error trying to call toJSON
once but I guess that only tries to run in error cases.
I got rid of the unnecessary DOM event code and simplified how messages from the chrome code are handled.