Files
NativeScript/globals/Readme.md
Vladimir Enchev c3abc01b65 readme updated
2014-05-10 15:51:32 +03:00

16 lines
487 B
Markdown

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 setTimeout:
```js
require("globals");
setTimeout(function(){ log("Test"); }, 2000);
var id = setTimeout(function(){ log("Test"); }, 2000);
...
clearTimeout(id);
setInterval(function(){ log("Test"); }, 2000);
var intervalId = setInterval(function(){ log("Test"); }, 2000);
...
clearInterval(intervalId)
```