mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
readme updated
This commit is contained in:
@ -1,5 +1,16 @@
|
|||||||
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:
|
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
|
```js
|
||||||
require("globals");
|
require("globals");
|
||||||
|
|
||||||
setTimeout(function(){ log("Test"); }, 2000);
|
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)
|
||||||
```
|
```
|
Reference in New Issue
Block a user