blob: 86be87727da5c8d4d799a776e6462ebc57a86d4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
from hulahop import _hulahop
_hulahop.startup()
from xpcom import components
from xpcom.components import interfaces
class Browser(_hulahop.Browser):
def __init__(self):
_hulahop.Browser.__init__(self)
def get_document(self):
browser = self.get_browser()
if not browser:
return None
else:
web_browser = browser.queryInterface(interfaces.nsIWebBrowser)
return web_browser.contentDOMWindow
document = property(get_document)
|