Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error when setting non-static handler on event #993

Closed
V0d01ey opened this issue Jul 24, 2018 · 1 comment
Closed

Runtime error when setting non-static handler on event #993

V0d01ey opened this issue Jul 24, 2018 · 1 comment
Assignees

Comments

@V0d01ey
Copy link

V0d01ey commented Jul 24, 2018

This sample code gives a runtime error on event handling after setting an event handler by method
public void SetHandler(Elt el).

    [JavaScript]
    class JSUtils
    {
        public int ff = 3;

        public void SetHandler(Elt el)
        {
            el.OnMouseDown(BodyMouseDownHandler);
        }

        public void BodyMouseDownHandler(WebSharper.JavaScript.Dom.Element el, WebSharper.JavaScript.Dom.Event ev)
        {
            JS.Window.Alert("mousedown on divEl. JSUtils.ff = " + ff);
        }
    }
@Jand42 Jand42 self-assigned this Jul 30, 2018
@Jand42
Copy link
Member

Jand42 commented Jul 30, 2018

@V0d01ey Thanks for the report, I am looking into this.

@Jand42 Jand42 added the bug label Jul 30, 2018
@Jand42 Jand42 added this to next minor in Releases Jul 30, 2018
@Jand42 Jand42 closed this as completed in adae245 Jul 30, 2018
@Tarmil Tarmil removed this from next minor in Releases Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants