NativeScript
Open main menu
Docs
@nativescript/core
Open NativeScript GitHub
Close menu
Docs
@nativescript/core
Search Anything
Preparing search index...
The search index is not available
NativeScript
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
@nativescript/core
Observable
Class Observable
Modules
Observable
constructor
_is
View
Base
_observers
property
Change
Event
_create
Property
Change
Data
_emit
_get
Event
List
_global
Notify
add
Event
Listener
get
has
Listeners
notify
notify
Property
Change
off
on
once
remove
Event
Listener
set
set
Property
_handle
Event
_index
OfListener
add
Event
Listener
off
on
once
remove
Event
Listener
Hierarchy
Observable
Implements
Observable
Implemented by
Observable
Index
Constructors
constructor
Properties
_is
View
Base
_observers
property
Change
Event
Methods
_create
Property
Change
Data
_emit
_get
Event
List
_global
Notify
add
Event
Listener
get
has
Listeners
notify
notify
Property
Change
off
on
once
remove
Event
Listener
set
set
Property
_handle
Event
_index
OfListener
add
Event
Listener
off
on
once
remove
Event
Listener
Constructors
constructor
new
Observable
(
)
:
Observable
Returns
Observable
Properties
_is
View
Base
_is
View
Base
:
boolean
Private
_observers
_observers
:
object
Type declaration
Static
property
Change
Event
property
Change
Event
:
string
Methods
_create
Property
Change
Data
_create
Property
Change
Data
(
propertyName
:
string
, value
:
any
, oldValue
?:
any
)
:
PropertyChangeData
Parameters
propertyName:
string
value:
any
Optional
oldValue:
any
Returns
PropertyChangeData
_emit
_emit
(
eventNames
:
string
)
:
void
Parameters
eventNames:
string
Returns
void
Private
_get
Event
List
_get
Event
List
(
eventName
:
string
, createIfNeeded
?:
boolean
)
:
ListenerEntry[]
Parameters
eventName:
string
Optional
createIfNeeded:
boolean
Returns
ListenerEntry[]
Private
_global
Notify
_global
Notify<T>
(
eventClass
:
string
, eventType
:
string
, data
:
T
)
:
void
Type parameters
T
:
EventData
Parameters
eventClass:
string
eventType:
string
data:
T
Returns
void
add
Event
Listener
add
Event
Listener
(
eventNames
:
string
, callback
:
function
, thisArg
?:
any
)
:
void
Parameters
eventNames:
string
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
Optional
thisArg:
any
Returns
void
get
get
(
name
:
string
)
:
any
Parameters
name:
string
Returns
any
has
Listeners
has
Listeners
(
eventName
:
string
)
:
boolean
Parameters
eventName:
string
Returns
boolean
notify
notify<T>
(
data
:
T
)
:
void
Type parameters
T
:
NotifyData
<
T
>
Parameters
data:
T
Returns
void
notify
Property
Change
notify
Property
Change
(
name
:
string
, value
:
any
, oldValue
?:
any
)
:
void
Parameters
name:
string
value:
any
Optional
oldValue:
any
Returns
void
off
off
(
eventNames
:
string
, callback
?:
any
, thisArg
?:
any
)
:
void
Parameters
eventNames:
string
Optional
callback:
any
Optional
thisArg:
any
Returns
void
on
on
(
eventNames
:
string
, callback
:
function
, thisArg
?:
any
)
:
void
Parameters
eventNames:
string
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
Optional
thisArg:
any
Returns
void
once
once
(
event
:
string
, callback
:
function
, thisArg
?:
any
)
:
void
Parameters
event:
string
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
Optional
thisArg:
any
Returns
void
remove
Event
Listener
remove
Event
Listener
(
eventNames
:
string
, callback
?:
any
, thisArg
?:
any
)
:
void
Parameters
eventNames:
string
Optional
callback:
any
Optional
thisArg:
any
Returns
void
set
set
(
name
:
string
, value
:
any
)
:
void
Parameters
name:
string
value:
any
Returns
void
set
Property
set
Property
(
name
:
string
, value
:
any
)
:
void
Parameters
name:
string
value:
any
Returns
void
Static
Private
_handle
Event
_handle
Event<T>
(
observers
:
ListenerEntry[]
, data
:
T
)
:
void
Type parameters
T
:
EventData
Parameters
observers:
ListenerEntry[]
data:
T
Returns
void
Static
Private
_index
OfListener
_index
OfListener
(
list
:
ListenerEntry[]
, callback
:
function
, thisArg
?:
any
)
:
number
Parameters
list:
ListenerEntry[]
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
Optional
thisArg:
any
Returns
number
Static
add
Event
Listener
add
Event
Listener
(
eventName
:
string
, callback
:
any
, thisArg
?:
any
)
:
void
Parameters
eventName:
string
callback:
any
Optional
thisArg:
any
Returns
void
Static
off
off
(
eventName
:
string
, callback
?:
any
, thisArg
?:
any
)
:
void
Parameters
eventName:
string
Optional
callback:
any
Optional
thisArg:
any
Returns
void
Static
on
on
(
eventName
:
string
, callback
:
any
, thisArg
?:
any
)
:
void
Parameters
eventName:
string
callback:
any
Optional
thisArg:
any
Returns
void
Static
once
once
(
eventName
:
string
, callback
:
any
, thisArg
?:
any
)
:
void
Parameters
eventName:
string
callback:
any
Optional
thisArg:
any
Returns
void
Static
remove
Event
Listener
remove
Event
Listener
(
eventName
:
string
, callback
?:
any
, thisArg
?:
any
)
:
void
Parameters
eventName:
string
Optional
callback:
any
Optional
thisArg:
any
Returns
void
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method