ym.core.Request
Overview
The main request object for managing Web service requests.
Initialization
var request = new ym.core.Request(jsonpAlias, forceCredentialsByParams);
Constructor(jsonpAlias, forceCredentialsByParams)
Name | Description | Data type | Default value |
---|---|---|---|
jsonpAlias |
An alias prefix for JSONP requests. | string |
|
forceCredentialsByParams |
Sends the credentials in the HTTP header for authentication, if desired. Note that this feature is not fully supported by all browsers. | bool |
false |
Methods
deprecated(component, link, expirationDate) ab v3
Writes a message in the developer tool that informs about an obsolete component.
Parameters
Name | Description | Data type | Default value |
---|---|---|---|
component |
The component that is marked as obsolete. | function |
|
link |
The link to the documentation of the new or changed component. | string |
|
expirationDate |
The date on which the component is removed. | date |
emit(eventName, arguments) ab v3
Triggers an event.
Parameters
Name | Description | Data type | Default value |
---|---|---|---|
eventName |
string |
||
arguments |
* |
Return
ym.core.EventEmitter
error(args) ab v3
Writes an error message in the developer tool.
Parameter
Name | Description | Data type | Default value |
---|---|---|---|
args |
Writes a notification in the developer tool. |
info(args) ab v3
Writes a message in the developer tool.
Parameter
Name | Description | Data type | Default value |
---|---|---|---|
args |
Several arguments and data types are possible. |
log(args) ab v3
Makes a log entry in the developer tool.
Parameter
Name | Description | Data type | Default value |
---|---|---|---|
args |
Several arguments and data types are possible. |
notify(msg) ab v3
Writes a notification in the developer tool.
Parameter
Name | Description | Data type | Default value |
---|---|---|---|
msg |
Notification | string |
off(eventName, handler) ab v3
Removes an event listener.
Parameters
Name | Description | Data type | Default value |
---|---|---|---|
eventName |
string |
||
handler |
function |
Return
ym.core.EventEmitter
on(eventName, handler) ab v3
Adds a listener.
Parameters
Name | Description | Data type | Default value |
---|---|---|---|
eventName |
string |
||
handler |
function |
Return
ym.core.EventEmitter
once(eventName, handler) ab v3
Adds a listener that reacts only to a single event.
Parameters
Name | Description | Data type | Default value |
---|---|---|---|
eventName |
string |
||
handler |
function |
Return
ym.core.EventEmitter
warn(args) ab v3
Writes a warning in the developer tool.
Parameter
Name | Description | Data type | Default value |
---|---|---|---|
args |
Several arguments and data types are possible. |