Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.

Saxon-CE event handlers?

Added by Hermann Stamm-Wilbrandt over 11 years ago

Hello,

where can I find a complete list of event handlers supported by Saxon-CE (like "ixsl:onclick" and "ixsl:onkeydown")? Saxon-CE documentation gives 4/1/0 hits when searching for onclick/onkeydown/onkeyup, no list: http://www.saxonica.com/ce/user-doc/1.1/index.html

Are all Javascript handlers supported? If so, is this a complete list (German language), or where can I find one? http://de.selfhtml.org/javascript/sprache/eventhandler.htm

Hermann Stamm-Wilbrandt.


Replies (4)

Please register to reply

RE: Saxon-CE event handlers? - Added by Michael Kay over 11 years ago

I hate the word "supported". There's the list we've tested, the list that ought to work in theory, the list that actually work in practice, the list that we'd recommend, the list that we know how to help you with, ...

We basically listen for all events on the HTML DOM, and if any event occurs we try to find a template whose mode name matches event.getType(). I imagine that the list of events we can receive is therefore the same as those enumerated in the GWT documentation here:

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/dom/client/BrowserEvents.html

but we certainly haven't tested all of these, and some of them may not be useful, and it's possible that GWT has only listed the ones that are cross-browser, or that this isn't the latest version of the list, etc.

We also have special code for handling non-DOM events, such as a change to the contents of the URL location property of the Window object.

We do know that GWT doesn't completely abstract away from browser differences in this area. In the chess-game demo that we did at XML Prague, we found considerable differences between browsers when it comes to doing drag-and-drop.

RE: Saxon-CE event handlers? - Added by Hermann Stamm-Wilbrandt over 11 years ago

Hello Michael,

thanks for the quick response.

I hate the word "supported". There's the list we've tested, the list that ought to work in theory, the list that actually work in practice, the list that we'd recommend, the list that we know how to help you with, ...

That is an interesting distinction ;-)

We basically listen for all events on the HTML DOM, and if any event occurs we try to find a template whose mode name matches event.getType(). I imagine that the list of events we can receive is therefore the same as those enumerated in the GWT documentation here:

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/dom/client/BrowserEvents.html

Thanks -- that was the list I searched for.

but we certainly haven't tested all of these, and some of them may not be useful, and it's possible that GWT has only listed the ones that are cross-browser, or that this isn't the latest version of the list, etc.

I created some tests, for "blur", mouse events and touch events: http://stamm-wilbrandt.de/ce/events/

"blur" works as expected, as well as the 8 mouse/click event tests. Even the 4 touch events work fine, but I have no idea how to trigger the gesture events ... !http://stamm-wilbrandt.de/ce/events/2013.03.03-21.48.20.jpeg!

  Hermann Stamm-Wilbrandt "":http://stamm-wilbrandt.de/ce/

RE: Saxon-CE event handlers? - Added by Hermann Stamm-Wilbrandt over 11 years ago

Oops, forgot a second question in addition to the gesture question:

Why do I have to use an ixsl:schedule-action in order to make "blur" working? (direct "ixsl:call(., 'blur')" inside the mode="ixsl:onclick" template does not work)




  

  
    
      
        
      
    

  

  
    

    
  

  Hermann Stamm-Wilbrandt "":http://stamm-wilbrandt.de/ce/

RE: Saxon-CE event handlers? - Added by Michael Kay over 11 years ago

You're asking questions here about the Javascript event model - Saxon makes no attempt to provide any abstraction over the raw JS model, so whatever is true at the JS level is equally true in Saxon-CE.

I assume the delay for calling blur() is all to do with the order in which events occur. There seems to be a fair bit of forum discussion on similar issues, e.g. http://stackoverflow.com/questions/4901899/action-on-blur-except-when-specific-element-clicked-with-jquery.

As for gesture events, I imagine they work on some devices and not others. I think there are considerable differences between devices.

    (1-4/4)

    Please register to reply