Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix HTML paths

  • Loading branch information...
commit af08d6f570377a8c9d980f105877702a3dff3504 1 parent 0dabbcc
Luke Closs authored
Showing with 10 additions and 5 deletions.
  1. +3 −2 test-web-view.py
  2. +7 −3 { → web}/index.html
View
5 test-web-view.py
@@ -6,7 +6,6 @@
from XOCom import XOCom
# The XOCom object helps us communicate with the browser
-uri = 'file:///home/olpc/src/testapp/index.html'
xocom = XOCom(uri)
# This is just a simple way to trigger events from python for testing
@@ -38,6 +37,8 @@ def quit(window):
window.set_default_size(600, 400)
window.connect("destroy", quit)
window.connect("key_press_event", keypress)
-window.add(xocom.create_webview())
+
+uri = "file:///home/olpc/src/testapp/web/index.html"
+window.add( xocom.create_webview(uri) )
window.show()
gtk.main()
View
10 index.html → web/index.html
@@ -2,8 +2,8 @@
<head>
<title>XOCom Example</title>
</head>
- <script type="text/javascript" src="web/jquery.js"></script>
- <script type="text/javascript" src="web/xo-code.js"></script>
+ <script type="text/javascript" src="jquery.js"></script>
+ <script type="text/javascript" src="xo-code.js"></script>
<script type="text/javascript">
/*
* This example code registers two simple functions
@@ -18,9 +18,13 @@
XO.register('write', function() {
return jQuery('textarea').html()
})
+ setTimeout( function () {
+ jQuery('#app-status').html("Registered XO Hooks")
+ }, 50)
</script>
<body>
- <div id="xo-status">No status</div><br />
+ XO Status:<div id="xo-status">No status</div><br />
+ App Status:<div id="app-status">No status</div><br />
<textarea rows="30" cols="80">Default text</textarea>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.