mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-25 11:21:08 -08:00
59 lines
2.2 KiB
HTML
59 lines
2.2 KiB
HTML
<html>
|
|
<body style="font-family: Arial; font-size: small;">
|
|
<h2 style="color: navy">Simple QtWebKit Bridge Demo</h2>
|
|
<ol>
|
|
<li>
|
|
<p>Call Lisp function, passing a <b>Date</b> and an <b>Array</b></p>
|
|
<input type="button"
|
|
value="Call"
|
|
onclick="alert(Lisp.testCall(new Date(), ['hello', 42]))">
|
|
<li>
|
|
<p><b>Change value</b> in Lisp (passing a QWebElement)</p>
|
|
<input type="button"
|
|
value="Flip"
|
|
onclick="Lisp.flipValue(document.getElementById('flip'))">
|
|
<input type="text"
|
|
id="flip"
|
|
value="never odd or even"
|
|
size="25">
|
|
<li>
|
|
<p><b>Eval</b> in Lisp</p>
|
|
<input type="text"
|
|
id="expression"
|
|
value="(clone)"
|
|
size="50"
|
|
style="font-family: Courier New; font-size: 110%;"
|
|
onkeypress="var code = window.event.keyCode;
|
|
if((code == 13) || (code == 14)) { // Return, Enter
|
|
var exp = document.getElementById('expression');
|
|
exp.value = Lisp.eval(exp.value); }">
|
|
<li>
|
|
<p>Set <b>Qt Property</b> of this QWebView</p>
|
|
<input type="button"
|
|
value="Zoom"
|
|
onclick="WebView.zoomFactor = document.getElementById('zoom').value">
|
|
<input type="text"
|
|
id="zoom"
|
|
value="0.9"
|
|
size="3">
|
|
<li>
|
|
<p>Call <b>Qt Slot</b> of this QWebView</p>
|
|
<input type="button"
|
|
value="Maximize"
|
|
onclick="WebView.showMaximized()">
|
|
</ol>
|
|
<hr>
|
|
<p>See also <a href="#1" onclick="Lisp.eval('(inspector)');">Web Inspector</a>
|
|
<b>Scripts</b> and <b>Console:</b>
|
|
</p>
|
|
<p>
|
|
Script debugging, introspecting web elements / functions and properties of exposed objects
|
|
<br>(type <em>Lisp</em> and see drop down of <em>QtRuntimeObject</em>)
|
|
</p>
|
|
<hr>
|
|
<p>
|
|
<a href="#2" onclick="Lisp.deleteLater()" style="color: red">Delete</a> exposed <em>Lisp</em>
|
|
object (examples 1 to 3 will stop working)
|
|
</p>
|
|
</body>
|
|
</html>
|