Re: [Saxon-JS 2] Types of events Saxon-JS cannot handle?
Martin Honnen <[email protected]> Wed, 9 Sep 2020 13:34:58 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
Am 09.09.2020 um 11:42 schrieb Martynas Jusevičius:
> are there any limitations re. the types of events Saxon-JS can handle?
> I don't think there is anything in the documentation on this topic.
>
> I'm doing a simple 'onblur' test but cannot get it to work (no effect):
>
> <xsl:template match="input[tokenize(@class, ' ') = 'typeahead']"
> mode="ixsl:onblur">
> <xsl:sequence select="ixsl:call(ixsl:window(), 'alert', [
> 'typeahead blur' ])"/>
> </xsl:template>
>
> Reproducible code: https://github.com/namedgraph/saxon-js2-test/tree/gh-pages
>
> Previously with Saxon-CE I also had to revert to JS with events such
> as 'onsubmit'.
The Chrome console suggests that Saxon has registered an event listener
for the "blur" event, it seems on the "document" object, it might be
that it needs to be set on the "window" object instead.
So perhaps line 25182 in SaxonJS2.rt.js reading
-1 === "httpabort afterprint beforeprint beforeunload
hashchange languagechange message offline online pagehide pageshow
popstate storage unhandledrejection unload".split(" ").indexOf(c) ?
window.document.addEventListener(c, d, !1) : window.addEventListener(c,
d, !1)
needs to add "blur" and "focus" in there e.g.
-1 === "httpabort afterprint beforeprint beforeunload
blur focus hashchange languagechange message offline online pagehide
pageshow popstate storage unhandledrejection unload".split("
").indexOf(c) ? window.document.addEventListener(c, d, !1) :
window.addEventListener(c, d, !1)
Wild guess from my side, however.
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help