StageWebViewBridge – JavaScript causes runtime error (Unknown protocol)-Collection of common programming errors

I’m using the StageWebViewBridge library to display remote web content in my Air for iOS application (Air 3.1, StageWebViewBridge svn_109_build_0.0.723). I’ve followed the usage guidelines, put the web content up on a server and included the StageWebViewBridge.js script on that page.

To my dismay, the JavaScript file causes a runtime error and halts execution of my scripts on the webpage:

uncaught exception: [Exception… “Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIDOMLocation.href]” nsresult: “0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL)” location: “JS frame :: http://localhost/ios/StageWebViewBridge.js :: anonymous :: line 126” data: no].

The faulty line in question reads like this:

setTimeout( function(){ window.location.href=sendingProtocol+'[SWVData]'+btoa( JSON.stringify( _serializeObject ) );},aggregatedCallDelay );

Who knows what btoa refers to in that statement? The sendingProtocol is either "about:" or "tuoba:" (to deal with endianness, I guess).

Ideas on how to fix this, anyone?