13.07.2026, 10:13
Version 20260710 (beta)
! Features from the beta version will not be available in the cloud until it becomes a stable version !
Most notable changes:
- Local apps can be modified when used in frame by JavaScript.
Example code:
Modify the widget ID and CSS part as needed.
! Features from the beta version will not be available in the cloud until it becomes a stable version !
Most notable changes:
- Local apps can be modified when used in frame by JavaScript.
Example code:
Code:
const widgetId = 5
const css = `
body { background: pink }
`
Visu.on('widget-ready', widgetId, ({ widget }) => {
const el = widget.getEl()
if (!el) {
return
}
const frame = el.querySelector('iframe')
if (!frame) {
return
}
frame.addEventListener('load', () => {
const doc = frame.contentDocument
const style = doc.createElement('style')
doc.head.appendChild(style)
style.appendChild(doc.createTextNode(css))
})
})
------------------------------
Ctrl+F5
Ctrl+F5