def __init__(self, url, dom_or_doc, navigator_or_class=GoogleChrome, name="", target='_blank', parent=None, opener=None, replace=False, screen=None, width=800, height=600, left=0, top=0, **kwds): self.url = url soup = dom_or_doc if isinstance(dom_or_doc, BeautifulSoup.BeautifulSoup) else None self.doc = w3c.getDOMImplementation(soup, **kwds) if self.doc: self.doc.window = self if soup: soup.doc = self.doc self._navigator = navigator_or_class(self) if type(navigator_or_class) == type else navigator_or_class self._location = Location(self) self._history = History(self) self._history.update(url, replace) self._target = target self._parent = parent self._opener = opener self._screen = screen or Screen(width, height, 32) self._closed = False self.name = name self.defaultStatus = "" self.status = "" self._left = left self._top = top self.innerWidth = width self.innerHeight = height self.outerWidth = width self.outerHeight = height self._event_listeners = {}
def __init__(self, url, dom_or_doc, navigator_or_class=InternetExplorer, name="", target='_blank', parent=None, opener=None, replace=False, screen=None, width=800, height=600, left=0, top=0, **kwds): self.url = url self.doc = w3c.getDOMImplementation(dom_or_doc, **kwds) if isinstance(dom_or_doc, BeautifulSoup.BeautifulSoup) else dom_or_doc self.doc.window = self self._navigator = navigator_or_class(self) if type(navigator_or_class) == type else navigator_or_class self._location = Location(self) self._history = History(self) self._history.update(url, replace) self._console = Console(self) self._target = target self._parent = parent self._opener = opener self._screen = screen or Screen(width, height, 32) self._closed = False self.name = name self.defaultStatus = "" self.status = "" self._left = left self._top = top self.innerWidth = width self.innerHeight = height self.outerWidth = width self.outerHeight = height