No event.type?

2 posts, 0 answers
  1. Marlon
    Marlon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 05 Jun 2015 Link to this post

    Is there any way to determine the type of event from a function callback? I assumed there'd be a type defined but that doesn't seem to be the case. So if I define data-init="init" on my view and had this js:


    console.log(e.type,, e);


    e.type is not defined. I tried inspecting the object and couldn't find a parameter for it.

  2. Petyo
    Petyo avatar
    2444 posts

    Posted 08 Jun 2015 Link to this post

    Hello Marlon,

    the init event is not a DOM event, so it does not feature type. In general, we don't encourage using single event handlers for multiple event types, so you may assume that this is an "init" event, especially given the binding you use. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top