cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <>
Subject [DISCUSS] cordova-js exec proxy for platforms without native implementations
Date Tue, 31 Jul 2012 20:20:29 GMT
While writing the Windows 8 JavaScript for cordova-js, it became clear that
if I wanted to use the same input code ( pre-exec calls )
I would have to put a proxy inside exec to maintain the signature, and map
additional JS function calls back to the callbacks.

Some of the goals I have been striving for :
- calls to cordova.exec are identical across different devices, so ALL
platforms can use the same JS.
- use the same plugin code, and add the proxy on the platform that requires

This approach applies to Windows 8, WebWorks, Bada, WebOS, all of which do
not require a native implementation

Here is a new api that is added on top of cordova.exec

cordova.exec.addCommandProxy(str_ID, obj_Proxy ); //:void
cordova.exec.removeCommandProxy(str_ID); //:void

Additionally, it may make sense to have this interface available on other
platforms as well, so we could do things like override the default native

Please review the current Windows 8 javascript implementation [1]  and
provide feedback.




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message