Class adways.content.Content
Extends: adways.hv.BridgedA Content represents a part of en enrichment. Generaly, an enrichment has only one content, but it can have more. See adways.content.DisplayableEnrichment
adways.content.Content
(
)
private
addEventListener
( kind, callback, [instance=null], [priority=0], [useWeakReference=false]
)
public
Parameters:
-
kind
<Constant>kind of the event to listen -
callback
<FUNCTION>function called when the event is fired -
[instance=null]
<Object> optionalcallback's instance. Useful when the callback is binded to an object:Class = function () {}; Class.prototype.callback = function () {}; var a = new Class(); aDispatcher.addEventListener(AN_EVENT_KIND, a.callback, a);
-
[priority=0]
<Number> optionalpriority -
[useWeakReference=false]
<Boolean> optionalnot yet used
instance==null
, the callback should be accessible from the global context and be a "static" method. Exemple:namespaceA.subnamespace.myCallback = function (event) { ... }; aDispatcher.addEventListener(AN_EVENT_KIND, namespaceA.subnamespace.myCallback);
blur
(
)
public
Indicates the engine to blur the content div.
connect
(
)
public
Connect bridged element
executeUserActions
(
)
public
Indicates the engine to execute the content user actions.
focus
(
)
public
Indicates the engine to focus the content div.
getCustomData
( key
)
public
Get a custom data entry
Parameters:
-
key
<String>"String" key entry.
Custom data entry (object that can be jsonified).
getRequireUserInput
(
)
public
Returns 1 if the content needs a front div to catch the user inputs, 0 otherwise.
?.
hasEventListener
( kind, callback, [instance=null]
)
public
Parameters:
-
kind
<Constant>the event's kind -
callback
<FUNCTION>the listener's function -
[instance=null]
<Object> optionalthe listener callback's instance
isConnected
(
)
public
Connect bridged element
nbEventListeners
( kind
)
public
Parameters:
-
kind
<Constant>the event's kind
removeAllEventListeners
(
)
public
removeEventListener
( kind, callback, [instance=null]
)
public
Parameters:
-
kind
<Constant>kind of the event to listen -
callback
<FUNCTION>function called when the event is fired -
[instance=null]
<Object> optionalcallback's instance
sendStat
( key, value
)
public
Send a custom stat data
Parameters:
-
key
<String>"String" key entry.
-
value
<String>"String" value entry.
setCustomData
( key, value
)
public
Set a custom data entry
Parameters:
-
key
<String>"String" key entry.
-
value
<Object>Object that can be jsonified.
1 if the value is changed, 2 if new value is set, 0 if error.