mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* refactor(console): remove the console module Removing the console module implementation eliminates some error-prone formatting logic, and certain platform-specific checks. The implementation was also android-specific. Left a stub Console class implementation as one is necessary to avoid errors with `console` being undefined during the snapshot stage for android. The console module is replaced by a 'console' implementation in the Android Runtime. See android-runtime/PR #884 * fix(tests): update console module tests
Globals module for defining functions part of the global context - you need only to call require for this module and all globals will be registered. For example:
require("globals");
setTimeout(function(){ console.log("Test"); }, 2000);
Global functions/objects are: setTimeout, clearTimeout, setInterval, clearInterval and console.