Class Index | File Index

## Classes

- _global_
- OWF
- OWF.Chrome
- OWF.DragAndDrop
- OWF.Eventing
- OWF.Intents
- OWF.Lang
- OWF.Launcher
- OWF.Log
- OWF.Metrics
- OWF.Preferences
- OWF.RPC
- OWF.Util
- Ozone.chrome.WidgetChrome
- Ozone.dragAndDrop.WidgetDragAndDrop
- Ozone.eventing.Widget
- Ozone.eventing.WidgetProxy
- Ozone.lang
- Ozone.launcher.WidgetLauncher
- Ozone.launcher.WidgetLauncherUtils
- Ozone.log
- Ozone.metrics
- Ozone.pref.PrefServer
- Ozone.state.WidgetState
- Ozone.state.WidgetStateHandler
- Ozone.util
- Ozone.util.pageLoad

# Namespace OWF.Eventing

Defined in: Widget.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| OWF.Eventing The OWF.Eventing object manages the eventing for an individual widget

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | OWF.Eventing.publish(channelName, message, dest) Publishes a message to a given channel.
<static> | OWF.Eventing.subscribe(channelName, handler) Subscribe to a named channel for a given function.
<static> | OWF.Eventing.unsubscribe(channelName) Unsubscribe to a named channel.

Namespace Detail
OWF.Eventing
The OWF.Eventing object manages the eventing for an individual widget
Method Detail
<static> OWF.Eventing.publish(channelName, message, dest)
Publishes a message to a given channel.

    OWF.Eventing.publish("ClockChannel", currentTimeString);

Parameters:
{String} channelName
  The name of the channel to publish to
{Object} message
  The message to publish to the channel.
{String} dest Optional
  The id of a particular destination. Defaults to null which sends to all subscribers on the channel. See OWF.getIframeId for a description of the id.

<static> OWF.Eventing.subscribe(channelName, handler)
Subscribe to a named channel for a given function.

    OWF.Eventing.subscribe("ClockChannel", this.update);
    var update = function(sender, msg, channel) {
    	document.getElementById('currentTime').innerHTML = msg;
    }

Parameters:
{String} channelName
  The channel to subscribe to.
{Function} handler
  The function you wish to subscribe. This function will be called with three arguments: sender, msg, channel.
{String} handler.sender Optional
  The first argument passed to the handler function is the id of the sender of the message. See OWF.getIframeId for a description of this id.
{Object} handler.msg Optional
  The second argument passed to the handler function is the message itself.
{String} handler.channel Optional
  The third argument passed to the handler function is the channel the message was published on.

<static> OWF.Eventing.unsubscribe(channelName)
Unsubscribe to a named channel.

    OWF.Eventing.unsubscribe("ClockChannel");

Parameters:
{String} channelName
  The channel to unsubscribe to.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Dec 21 2012 17:25:00 GMT-0500 (EST)