Package js.dom

Examples of js.dom.UIEvent.initEvent()


     * @param element
     */
    public static void click(Element element) {
        if (element != null) {
            UIEvent event = document.createEvent("UIEvent");
            event.initEvent("click", true, true);

            element.dispatchEvent(event);
        }
    }

View Full Code Here


     * @param element
     */
    public static void mouseDown(Element element) {
        if (element != null) {
            UIEvent event = document.createEvent("UIEvent");
            event.initEvent("mousedown", true, true);

            element.dispatchEvent(event);
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.