This commit is contained in:
pls.153 2022-03-28 16:40:30 +02:00
parent 0756ee1b5d
commit de42776adf
3 changed files with 12 additions and 9 deletions

View file

@ -16,8 +16,6 @@
(clog-connection::handle-close-connection 'qml-webview))
(defun boot ()
#-ios
(webview/on-close)
(qml:q> |url| ui:*browser* (format nil "file://~A"
(merge-pathnames "htm/boot.html"))))

View file

@ -31,7 +31,12 @@ Item {
id: reload
anchors.bottom: parent.bottom
text: "Reload"
onClicked: browser.reload()
onClicked: {
if (Qt.platform.os !== "ios") {
Lisp.call("clog:webview/on-close")
}
browser.reload()
}
}
Button {

View file

@ -35,13 +35,13 @@ also needed on the desktop, if used with LQML).
Info
----
This shows how to run CLOG on mobile. It uses two different approaches,
depending on the OS:
This shows how to run a CLOG app locally on mobile. It uses two different
approaches, depending on the OS:
* direct calls to the browser to run JS, and a small hack to call back to CLOG
1. direct calls to the browser to run JS, and a small hack to call back to CLOG
on browser events
* a simple local websocket-server; this is needed on iOS, where the above
2. a simple local websocket-server; this is needed on iOS, where the above
approach doesn't work
The webview is the native one of the mobile device, which has some