JS Api - Toorion/qml-browser GitHub Wiki
QmlBrowser JavaScript API
Global methods
preload('FullFilename')
Some of QML components doesn't allow to use remotelly files, only local. This function is designed for such components. FullFilename is full path of preloaded file from web root directory.
download('url')
Start the download of file by specified URL
Standard Browser compatible JavaScript API
Backward compatible for script which used standard browser javascript API
console.log('message')
Log message in developer console
console.error('error')
Log error in developer console
alert('message')
Rise alert popup
confirm('message')
Rise confirm popap and return user choice
window (Object)
window.width
Return width of the current window
window.height
Return height of the current window
window.open(url, windowName)
Open specified url in new window or in new tab, if windowName = '_blank'
document (Object)
document.location
Return the URL of current page
document.location.href
Return the URL of current page