[Webkit-unassigned] [Bug 16401] [GTK] GObject/C DOM binding
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 20 07:19:51 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=16401
------- Comment #2 from lkcl at lkcl.net 2008-08-20 07:19 PDT -------
Created an attachment (id=22894)
--> (https://bugs.webkit.org/attachment.cgi?id=22894&action=view)
adds javascript-execution and eval to DOM model
about = "<html><body id='body'></body></html>"
self._browser.load_string(about, "text/html", "iso-8859-15", "about:")
self.show_all()
def js_test(self):
main_frame = self._browser.get_main_frame()
print dir(main_frame)
ctx = main_frame.gjs_get_global_context()
print dir(ctx)
doc = ctx.get_by_name("document")
print doc, dir(doc)
doc.fred = 5
print doc.fred
win = doc.get_by_name("window")
print win, dir(win)
print doc.get_by_name("fred")
print doc.get_by_name("joe")
#doc.eval("para = document.createTextNode('Some content.');")
ctx.eval("console.error('hello');")
doc.execute("document.getElementById('body').appendChild(document.createTextNode('Some
content.'));")
#doc.execute("document.appendChild(document.createTextNode('Some
content.'));")
#doc.execute("para2 = document.createTextNode('Some content.');")
#para = doc.get_by_name("para")
#print "para", para, para.get_string()
#doc.execute("document.appendChild(para);")
def _set_title(self, title):
self.props.title = title
def _loading_start_cb(self, view, frame):
main_frame = self._browser.get_main_frame()
if frame is main_frame:
self._set_title(_("Loading %s - %s") %
(frame.get_title(),frame.get_uri()))
self._toolbar.set_loading(True)
def _loading_stop_cb(self, view, frame):
# FIXME: another frame may still be loading?
self._toolbar.set_loading(False)
self.js_test()
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list