From 8018ba499f0495565111eb4505216163a16c2b36 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 24 Sep 2014 12:17:46 +0200 Subject: [PATCH] Ox.Element: update documentation --- source/Ox.UI/js/Core/Element.js | 139 +++++++++++++++++++++++++------- 1 file changed, 111 insertions(+), 28 deletions(-) diff --git a/source/Ox.UI/js/Core/Element.js b/source/Ox.UI/js/Core/Element.js index d59cc90c..f33d9b14 100644 --- a/source/Ox.UI/js/Core/Element.js +++ b/source/Ox.UI/js/Core/Element.js @@ -364,11 +364,11 @@ /*@ bindEvent Adds event handler(s) - (callback) -> This element + (callback) -> This element object Adds a catch-all handler - (event, callback) -> This element + (event, callback) -> This element object Adds a handler for a single event - ({event: callback, ...}) -> This element + ({event: callback, ...}) -> This element object Adds handlers for one or more events callback Callback function data event data (key/value pairs) @@ -401,16 +401,16 @@ }; /*@ - bindMessage Adds message handlers (if the element is an iframe) - (callback) -> This element + bindMessage Adds message handler(s) (if the element is an iframe) + (callback) -> This element object Adds a catch-all handler - (event, callback) -> This element - Adds a handler for a single event - ({event: callback, ...}) -> This element - Adds handlers for on or more events + (message, callback) -> This element object + Adds a handler for a single message + ({message: callback, ...}) -> This element object + Adds handlers for one or more messages callback Callback function - data event data (key/value pairs) - event Event name + data Message data (key/value pairs) + message Message name @*/ Ox.Element.prototype.bindMessage = Ox.Element.prototype.onMessage = function bindMessage() { var self = this.self(_); @@ -420,6 +420,18 @@ return this; }; + /*@ + bindMessageOnce Adds message handler(s) that run only once + (callback) -> This element object + Adds a catch-all handler + (message, callback) -> This element object + Adds a handler for a single message + ({message: callback, ...}) -> This element object + Adds handlers for one or more messages + callback Callback function + data Message data (key/value pairs) + event Message name + @*/ Ox.Element.prototype.bindMessageOnce = Ox.Element.prototype.onMessageOnce = function bindMessageOnce() { var self = this.self(_); if (self.options.element == '