For Saxon-JS under Node, expose global as ixsl:window() or ixsl:global()
For Saxon-JS in the browser, the function https://www.saxonica.com/saxon-js/documentation2/index.html#!ixsl-extension/functions/window gives access to the window object which is the gobal object in the browser environment. The
global object under Node.js serves the same purpose but it isn't exposed in Saxon-JS under Node, it appears.
global object exposed as e.g.
ixsl:window(), or, if that breaks things, to create a new
ixsl:global(), which, in the browser, returns the window object and under Node.sj returns the
new URL(...), you can do so using e.g.
ixsl:window() => ixsl:call('Reflect.construct', [ ixsl:window()?URL, [ ...] ]) in the browser but there is no way to do the same currently under Node.js as you would need to have
ixsl:window() return the
global object or you would need a new
ixsl:global() to use e.g.
ixsl:global() => ixsl:call('Reflect.construct', [ ixsl:global()?URL, [ ...] ]).
Updated by Norm Tovey-Walsh 7 months ago
That makes sense to me. I can't decide which I like better, abusing
ixsl:window on Node.js to return the global object or adding a new
I would have sworn there was also a feature request on file to support calls to
new without reflection, but I'm not able to locate it just at the moment.
Please register to edit this issue