ready-promise
Wait for the resource initialization is complete.
Installation
$ npm install ready-promise --save
Usage
const isJsBridgeLoaded = windowjsBridge
API
readyPromise(watchFunc[, options])
-
watchFunc
(Function)To determine whether a variable to be monitored exists or meets the conditions, you need to implement it yourself, returning
true
orfalse
. -
options
rate
(Number) Unitms
, the frequency of executingwatchFunc
, default50
.timeout
(Number) Unitms
, judge the timeout maximum duration limit, the default1500
.