Bug #6418
closedIXSL extensions which are not available on Node.js
100%
Description
The documentation claims that ixsl:set-style
and ixsl:style()
are available in Node.js; but I think that these are actually only available in the browser. In the browser, we are dealing with an HTMLElement
from the HTML page, which has a style
property; but a general Element
(as in Node.js) doesn't have a style
property.
In fact, attempts to use ixsl:set-style
and ixsl:style()
in Node.js currently fall over in the code. Using ixsl:set-style
results in an error "ReferenceError: Element is not defined" caused by the use of !(elem instanceof Element)
in the run time implementation. We should probably replace this with DomUtils.isElement(elem)
, even if this is only for the browser. Meanwhile, the implementation for ixsl:style()
calls window.getComputedStyle(x)
; which falls over in Node.js because there is no window
.
I think we should update the code to produce a run time error if these extensions are used when running in Node.js. Also for other relevant IXSL functions: ixsl:event()
, ixsl:location()
, ixsl:query-params()
.
Please register to edit this issue
Also available in: Atom PDF Tracking page