Is the namespace for window informations and operations.
Properties:
Name | Type | Description |
---|---|---|
unitOfSize |
string | The unit of size used in a whole of HTML page. |
rootFontSize |
number | The root font size.
This value is a number, and can be specified as a number or a string
of which format is |
scrollbarWidth |
number | The scroll bar width.
The unit of this value is same with |
scrollLeft |
number | The horizontal scroll position of window.
The unit of this value is same with |
scrollTop |
number | The vertical scroll position of window.
The unit of this value is same with |
maxScrollLeft |
number | The maximum horizontal scroll position of
window.
The unit of this value is same with |
maxScrollTop |
number | The maximum vertical scroll position of
window.
The unit of this value is same with |
scrollWidth |
number | The width of scrollable area of window.
The unit of this value is same with |
scrollHeight |
number | The height of scrollable area of window.
The unit of this value is same with |
relayoutDelay |
number | The delay time to re-layout a page against resize events. The unit of this value is millisecond. |
Methods
-
<static> addRelayoutListener(listener)
-
Adds a re-layout listener which is to be called when a browser is resized or
xslet.window.relayout
method is executed.Parameters:
Name Type Description listener
function A listener function.
-
<static> convertUnit(value, fromUnit, toUnit)
-
Converts
value
infromUnit
to new value intoUnit
. The units allowed are either'px'
,'mm'
and'rem'
.Parameters:
Name Type Description value
number A value to be converted.
fromUnit
string The unit of
value
.toUnit
string The unit of value after converted.
Returns:
The value after converted.
- Type
- number
-
<static> relayout()
-
Re-layout a page. This method forcely executes re-layout listeners registered by
addRelayoutListener
method. -
<static> removeRelayoutListener(listener)
-
Removes a registered re-layout listener.
Parameters:
Name Type Description listener
function A listener function.