Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/__init__.py
blob: 9810d766acec924c3dac143567fadc3fbb8a55b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from hulahop import _hulahop

from _hulahop import shutdown

_hulahop.startup()

from xpcom import components
from xpcom.components import interfaces

class Browser(_hulahop.Browser):
    def __init__(self):
        _hulahop.Browser.__init__(self)

    def get_browser(self):
        return _hulahop.Browser.get_browser(self)

    def get_document(self):
        return self.browser.contentDOMWindow

    def load_uri(self, uri):
        web_nav = self.browser.queryInterface(interfaces.nsIWebNavigation)
        web_nav.loadURI(uri, interfaces.nsIWebNavigation.LOAD_FLAGS_NONE,
                        None, None, None)

    document = property(get_document)
    browser = property(get_browser)