/** * Defines an event handler (or maybe any other object). * @param eventName the event name (e.g. "onclick") * @param value the property (<code>null</code> to reset it) */ protected void setEventHandlerProp(final String eventName, final Object value) { getEventListenersContainer().setEventHandlerProp(StringUtils.substring(eventName.toLowerCase(), 2), value); }
/** * Allows the removal of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture (not yet implemented) * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.removeEventListener">Mozilla documentation</a> */ public void jsxFunction_removeEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().removeEventListener(type, listener, useCapture); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.addEventListener">Mozilla documentation</a> */ public void jsxFunction_addEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().addEventListener(type, listener, useCapture); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "onclick") * @param listener the event listener * @see <a href="http://msdn.microsoft.com/en-us/library/ms536343.aspx">MSDN documentation</a> * @return <code>true</code> if the listener has been added */ public boolean jsxFunction_attachEvent(final String type, final Function listener) { return getEventListenersContainer().addEventListener(StringUtils.substring(type, 2), listener, false); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.addEventListener">Mozilla documentation</a> */ public void jsxFunction_addEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().addEventListener(type, listener, useCapture); }
/** * Allows the removal of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture (not yet implemented) * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.removeEventListener">Mozilla documentation</a> */ public void jsxFunction_removeEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().removeEventListener(type, listener, useCapture); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.addEventListener">Mozilla documentation</a> */ public void jsxFunction_addEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().addEventListener(type, listener, useCapture); }
/** * Allows the removal of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture (not yet implemented) * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.removeEventListener">Mozilla documentation</a> */ public void jsxFunction_removeEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().removeEventListener(type, listener, useCapture); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.addEventListener">Mozilla documentation</a> */ public void jsxFunction_addEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().addEventListener(type, listener, useCapture); }
/** * Allows the removal of event listeners on the event target. * @param type the event type to listen for (like "click") * @param listener the event listener * @param useCapture If <code>true</code>, indicates that the user wishes to initiate capture (not yet implemented) * @see <a href="http://developer.mozilla.org/en/docs/DOM:element.removeEventListener">Mozilla documentation</a> */ public void jsxFunction_removeEventListener(final String type, final Function listener, final boolean useCapture) { getEventListenersContainer().removeEventListener(type, listener, useCapture); }
/** * Defines an event handler (or maybe any other object). * @param eventName the event name (like "onclick") * @param value the property (<code>null</code> to reset it) */ protected void setEventHandlerProp(final String eventName, final Object value) { getEventListenersContainer().setEventHandlerProp(StringUtils.substring(eventName.toLowerCase(), 2), value); }
/** * Defines an event handler (or maybe any other object). * @param eventName the event name (like "onclick") * @param value the property (<code>null</code> to reset it) */ protected void setEventHandlerProp(final String eventName, final Object value) { getEventListenersContainer().setEventHandlerProp(StringUtils.substring(eventName.toLowerCase(), 2), value); }
/** * Defines an event handler (or maybe any other object). * @param eventName the event name (like "onclick") * @param value the property (<code>null</code> to reset it) */ protected void setEventHandlerProp(final String eventName, final Object value) { getEventListenersContainer().setEventHandlerProp(StringUtils.substring(eventName.toLowerCase(), 2), value); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "onclick") * @param listener the event listener * @see <a href="http://msdn.microsoft.com/en-us/library/ms536343.aspx">MSDN documentation</a> * @return <code>true</code> if the listener has been added */ public boolean jsxFunction_attachEvent(final String type, final Function listener) { return getEventListenersContainer().addEventListener(StringUtils.substring(type, 2), listener, false); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "onclick") * @param listener the event listener * @see <a href="http://msdn.microsoft.com/en-us/library/ms536343.aspx">MSDN documentation</a> * @return <code>true</code> if the listener has been added */ public boolean jsxFunction_attachEvent(final String type, final Function listener) { return getEventListenersContainer().addEventListener(StringUtils.substring(type, 2), listener, false); }
/** * Allows the registration of event listeners on the event target. * @param type the event type to listen for (like "onclick") * @param listener the event listener * @see <a href="http://msdn.microsoft.com/en-us/library/ms536343.aspx">MSDN documentation</a> * @return <code>true</code> if the listener has been added */ public boolean jsxFunction_attachEvent(final String type, final Function listener) { return getEventListenersContainer().addEventListener(StringUtils.substring(type, 2), listener, false); }
private void copyEventListenersWhenNeeded(final DomNode domNode, final DomNode clonedNode) { final Node jsNode = (Node) domNode.getScriptObject(); if (jsNode != null) { final Node jsClonedNode = getJavaScriptNode(clonedNode); jsClonedNode.getEventListenersContainer().copyFrom(jsNode.getEventListenersContainer()); } // look through the children DomNode child = domNode.getFirstChild(); DomNode clonedChild = clonedNode.getFirstChild(); while (child != null && clonedChild != null) { copyEventListenersWhenNeeded(child, clonedChild); child = child.getNextSibling(); clonedChild = clonedChild.getNextSibling(); } }
private void copyEventListenersWhenNeeded(final DomNode domNode, final DomNode clonedNode) { final Node jsNode = (Node) domNode.getScriptObject(); if (jsNode != null) { final Node jsClonedNode = getJavaScriptNode(clonedNode); jsClonedNode.getEventListenersContainer().copyFrom(jsNode.getEventListenersContainer()); } // look through the children DomNode child = domNode.getFirstChild(); DomNode clonedChild = clonedNode.getFirstChild(); while (child != null && clonedChild != null) { copyEventListenersWhenNeeded(child, clonedChild); child = child.getNextSibling(); clonedChild = clonedChild.getNextSibling(); } }
private void copyEventListenersWhenNeeded(final DomNode domNode, final DomNode clonedNode) { final Node jsNode = (Node) domNode.getScriptObject(); if (jsNode != null) { final Node jsClonedNode = getJavaScriptNode(clonedNode); jsClonedNode.getEventListenersContainer().copyFrom(jsNode.getEventListenersContainer()); } // look through the children DomNode child = domNode.getFirstChild(); DomNode clonedChild = clonedNode.getFirstChild(); while (child != null && clonedChild != null) { copyEventListenersWhenNeeded(child, clonedChild); child = child.getNextSibling(); clonedChild = clonedChild.getNextSibling(); } }
private void copyEventListenersWhenNeeded(final DomNode domNode, final DomNode clonedNode) { final Node jsNode = (Node) domNode.getScriptObject(); if (jsNode != null) { final Node jsClonedNode = getJavaScriptNode(clonedNode); jsClonedNode.getEventListenersContainer().copyFrom(jsNode.getEventListenersContainer()); } // look through the children DomNode child = domNode.getFirstChild(); DomNode clonedChild = clonedNode.getFirstChild(); while (child != null && clonedChild != null) { copyEventListenersWhenNeeded(child, clonedChild); child = child.getNextSibling(); clonedChild = clonedChild.getNextSibling(); } }