2 ms·
This seems to be modelled after Sciter's popups that existed 10 or so years. anchorElement.popup(elementToPopup, options) - https://docs.sciter.com/docs/DOM/El
by c-smile 2y ago
This seems to be modelled after Sciter's popups that existed 10 or so years.
anchorElement.popup(elementToPopup, options) - https://docs.sciter.com/docs/DOM/Element/#popup https://docs.sciter.com/docs/DOM/Element/#popup
In Sciter popup element is always associated with its anchor element and appears relative to it.
CSS was expanded to support popups: :popup state flag/selector is "on" the popup element and :owns-popup is "on" on popup anchor element when the popup is shown. Also several CSS properties: popup-position, popup-anchor-reference-point, popup-reference-point, popup-animation.
Sciter has built-in JSX and so element.popup() accepts JSX that creates popup DOM element on demand, for example this
button.onclick = function() {
button.popup(<select type="list">
<option>A</option>
<option>B</option>
<option>C</option>
</select>)
}
will popup selectable list as dropdown popup.