You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Basic networking support has been added to the HTML5 engine by way of the **load** command. The HTML5 **load** command functions in the same way as the **load** command on mobile platforms, with a completion message being sent on download, containing the contents of the URL (or any error) and the **urlProgress** message being sent periodically during the request.
4
+
5
+
**Note: The current HTML5 support for 'load url' is experimental, and will be replaced by a libUrl-like API in a subsequent DP ensuring it has parity with other platforms when 'Internet Library' is used.**
6
+
7
+
**Note: Only HTTP and HTTPS protocols are supported and URLs can only be fetched from the domain hosting the web page running the HTML5 engine.**
8
+
9
+
```
10
+
command fetchURL pURL
11
+
load URL pURL with "loadComplete"
12
+
end fetchURL
13
+
14
+
on loadComplete pURL, pStatus, pData, pTotal
15
+
-- pURL - The URL being fetched.
16
+
--
17
+
-- pStatus - The status of the URL: One of:
18
+
-- * downloaded
19
+
-- * error
20
+
--
21
+
-- pData - This will be:
22
+
-- * the content of the URL, if pStatus is downloaded
23
+
-- * the error string, if pStatus is error
24
+
--
25
+
-- pTotal - The total size of the URL, in bytes.
26
+
end loadComplete
27
+
28
+
on urlProgress pURL, pStatus, pData, pTotal
29
+
-- pURL - The URL being fetched.
30
+
--
31
+
-- pStatus - The current status of the operation. One of:
32
+
-- * contacted
33
+
-- * requested
34
+
-- * loading
35
+
-- * downloaded
36
+
-- * error
37
+
--
38
+
-- pData - This will be:
39
+
-- * the number of bytes fetched, if pStatus is loading
0 commit comments