0

I am new to javascript. i have below native method in my GWT code. what does it indicates? Please help me.

private native void fireEvent(Element node) /*-{
        node.click();
    }-*/;
1
  • 1
    It seems to fire the click event of an element, e.g. of <button onclick="alert(0)">but</button>. Commented Jan 17, 2012 at 11:05

3 Answers 3

3

It fires the onClick function of the Element called.

Sign up to request clarification or add additional context in comments.

Comments

2

It mimics the event of the user clicking on the element node, i.e. it fakes a click on a particular part of the page (indicated by 'node'), although the actual click part seems to be commented out. This looks more like a prototype.

1 Comment

It's not a prototype, it GWT's specific notation for inserting native JavaScript.
2

It simulates a mouse click on element.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.