coremob / camera

An open-source camera application built using Web technology.
198 stars 64 forks source link

getBlobFromCanvas mixes sync & async paths #8

Closed dontcallmedom closed 11 years ago

dontcallmedom commented 11 years ago

Depending on whether toBlob is supported, getBlobFromCanvas will either use an asynchronous path (with toBlob) or a synchronous one (with toDataUrl).

The only way getBlobFromCanvas appears to work today is because it is used before windows.prompt which, asking info from a user, is slow enough to (most of the time) ensure that the async path has had time to finish. But that's not a reliable workaround.