[pyxpcom] queryInterface, browser, python and xul
by Lord Ruslan Nightmare other posts by this author
Jul 1 2007 9:07PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] 'import components' issue with xpcom and python 2.5.1
|
Re: [pyxpcom] queryInterface, browser, python and xul
Hello.
Spent last night trying to figure out how to port mybrowser (
http://benjamin.smedbergs.us/xulrunner/mybrowser-0.2.2.xulapp ) from
JavaScript to Python.
It fails at LoadURI() - AttributeError: XPCOM component '<unknown> ' has
no attribute 'LoadURI'
I tried to get all available interfaces and blindly query browser for them:
browser = document.getElementById("browser")
for name, iid in components.interfaces.items():
try:
browser.queryInterface(iid)
dump(str(name)+'\n')
except:
donothing()
Here is what i got:
nsISupportsWeakReference
nsIObserver
nsIDOMXULElement
nsIDOM3Node
nsIDOM3EventTarget
nsIDOMEventTarget
nsIAccessibleProvider
nsIDOMNSEventTarget
nsIDOMElementCSSInlineStyle
nsIDOMNode
nsIDOMEventListener
nsIDOMNSElement
nsIClassInfo
nsISupports
nsIDOMElement
Checked all of them, and it seems that none is capable of anything that
browser is supposed to do (like, loading URI).
So...this is not implemented, or it's just my poor Python/XPCOM skills?
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Lord Ruslan Nightmare
Mark Hammond
Shane Caraveo
|