incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <>
Subject JS->Native Bridge on iOS and the "Options" object
Date Thu, 12 Jul 2012 20:16:48 GMT
The exec() method on iOS allows only a single js object to appear in the
arguments, and it passes it onto the native side as the "options" object.

Code snippet:
    for (var i = 0; i < actionArgs.length; ++i) {
        var arg = actionArgs[i];
        if (arg === undefined || arg === null) { // nulls are pushed to the
args now (becomes NSNull)
        } else if (typeof(arg) == 'object' && !(utils.isArray(arg))) {
            command.options = arg;
        } else {

For reworking how headers are sent in FileTransfer, I tried to pass the
headers map as well as the upload params, and so got into trouble when the
headers map clobbered the params map in the code snippet above.

So, I'm wondering what the reason is for doing this?

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