Webworks.js – under the hood on port 8472
A relatively recent change to Webworks apps on BB10, was that you had to include the file:
<script src=”local:///chrome/webworks.js” type=”text/javascript”></script> in order to access the native functionality, such as browser invoke etc.
Interestingly, if you enable remote web inspector, you can actually see the contents of this file (listed here), and the underlying “gubbins” are exposed.
What webworks.js is actually doing, is that it converts calls such as blackberry.invoke.invoke({target: “sys.browser”,uri: “xxxx”}); to an AJAX call to localhost on port 8472, which does not appear to be accessible from outside the device itself.
The full protocol is unlikely to be published, and it’s not a good idea to use this protocol directly, it’s more for academic interest.
Here is an example AJAX request
-
Request URL:
-
Request Method:POST
-
Status Code:200 OK