Project

Profile

Help

Network maintenance. We will be observing a scheduled maintenance window to mondernize the access routers at our primary data center this Sunday, October 22, 2017 from 20:00 UTC until Monday, October 23, 03:00 UTC. Planio services may be unavailable for about 30 minutes during the maintenance window.

Saxon-CE event handlers?

Added by Hermann Stamm-Wilbrandt over 4 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 4 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 4 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 ...

 
Hermann Stamm-Wilbrandt <myCE/>

RE: Saxon-CE event handlers? - Added by Hermann Stamm-Wilbrandt over 4 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)

<!--
     3/3/2012: blur test
-->
<xsl:transform version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:ixsl="http://saxonica.com/ns/interactiveXSLT" 
  extension-element-prefixes="ixsl" 
>
  <xsl:template match="/" name="main"/>

  <xsl:template match="textarea[@id='blur']" mode="ixsl:onclick">
    <ixsl:schedule-action wait="50">
      <xsl:call-template name="blur">
        <xsl:with-param name="this" select="."/>
      </xsl:call-template>
    </ixsl:schedule-action>

  </xsl:template>

  <xsl:template name="blur">
    <xsl:param name="this"/>

    <xsl:value-of select="ixsl:call($this, 'blur')"/>
  </xsl:template>
</xsl:transform>

 
Hermann Stamm-Wilbrandt <myCE/>

RE: Saxon-CE event handlers? - Added by Michael Kay over 4 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