如视 Five SDK
Preparing search index...
five
Fetcher
Class Fetcher
Index
Constructors
constructor
Methods
ajax
load
Image
preload
Constructors
constructor
new
Fetcher
(
options
?:
NetworkOptions
)
:
Fetcher
Parameters
options
:
NetworkOptions
= {}
Returns
Fetcher
Methods
ajax
ajax
<
T
extends
AjaxResponseType
=
"text"
>
(
source
:
string
,
options
?:
AjaxOptions
<
T
>
,
onLoad
?:
NetworkSuccessCallback
<
AjaxResponseTypeMapping
<
T
>
>
,
onError
?:
NetworkErrorCallback
,
onProgress
?:
NetworkProgressCallback
,
)
:
Promise
<
NetworkResponse
<
AjaxResponseTypeMapping
<
T
>
,
NetWorkMeta
>
>
Type Parameters
T
extends
AjaxResponseType
=
"text"
Parameters
source
:
string
options
:
AjaxOptions
<
T
>
= {}
onLoad
:
NetworkSuccessCallback
<
AjaxResponseTypeMapping
<
T
>
>
= noop
onError
:
NetworkErrorCallback
= noop
onProgress
:
NetworkProgressCallback
= noop
Returns
Promise
<
NetworkResponse
<
AjaxResponseTypeMapping
<
T
>
,
NetWorkMeta
>
>
load
Image
loadImage
<
T
extends
HTMLImageElement
=
HTMLImageElement
>
(
source
:
string
,
options
?:
NetworkOptions
,
onLoad
?:
NetworkSuccessCallback
,
onError
?:
NetworkErrorCallback
,
onProgress
?:
NetworkProgressCallback
,
target
?:
T
,
)
:
Promise
<
NetworkResponse
<
T
,
NetWorkMeta
>
>
Type Parameters
T
extends
HTMLImageElement
=
HTMLImageElement
Parameters
source
:
string
options
:
NetworkOptions
= {}
onLoad
:
NetworkSuccessCallback
= noop
onError
:
NetworkErrorCallback
= noop
onProgress
:
NetworkProgressCallback
= noop
Optional
target
:
T
Returns
Promise
<
NetworkResponse
<
T
,
NetWorkMeta
>
>
preload
preload
(
source
:
string
,
options
?:
NetworkOptions
)
:
Promise
<
void
>
Parameters
source
:
string
options
:
NetworkOptions
= {}
Returns
Promise
<
void
>
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
ajax
load
Image
preload
如视 Five SDK
Loading...