mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Export all fetch types to the global object when running in snapshot
This commit is contained in:
@@ -99,6 +99,9 @@ if (global.__snapshot) {
|
||||
|
||||
var fetch = require("fetch");
|
||||
global.fetch = fetch.fetch;
|
||||
global.Headers = fetch.Headers;
|
||||
global.Request = fetch.Request;
|
||||
global.Response = fetch.Response;
|
||||
} else {
|
||||
registerOnGlobalContext("setTimeout", "timer");
|
||||
registerOnGlobalContext("clearTimeout", "timer");
|
||||
|
||||
Reference in New Issue
Block a user