def __init__(self, url, dom_or_doc, navigator=None, personality='winxpie60', 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.doc.contentWindow = self self._navigator = navigator if navigator else Navigator( personality, self) self._location = Location(self) self._history = History(self) self._history.update(url, replace) #self.doc.location = self._location self.doc.location = property(self.getLocation, self.setLocation) self._target = target self._parent = parent if parent else self self._opener = opener self._screen = screen or Screen(width, height, 32) self._closed = False self._personality = personality self.__init_personality() 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.timers = [] self.java = java() self._symbols = set() self._methods = tuple() log.MIMEHandler.window = self
def __init__(self, url, dom_or_doc, navigator = None, personality = 'winxpie60', name="", target='_blank', parent = None, opener = None, replace = False, screen = None, width = 800, height = 600, left = 0, top = 0, offline_content = dict(), **kwds): self.url = url self.doc = w3c.getDOMImplementation(dom_or_doc, **kwds) if isinstance(dom_or_doc, BeautifulSoup.BeautifulSoup) else dom_or_doc self.offline_content = offline_content self.doc.window = self self.doc.contentWindow = self self._navigator = navigator if navigator else Navigator(personality, self) self._location = Location(self) self._history = History(self) self._history.update(url, replace) #self.doc.location = self._location self.doc.location = property(self.getLocation, self.setLocation) self._target = target self._parent = parent if parent else self self._opener = opener self._screen = screen or Screen(width, height, 32) self._closed = False self._personality = personality self.__init_personality() 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.timers = [] self.java = java() self._symbols = set() self._methods = tuple() log.MIMEHandler.window = self self.log = log