[Project_owners] Re: calling window.sidebar.addPanel() from chrome

Philip Chee philip at aleytys.pc.my
Mon Feb 20 19:19:25 EST 2006


On Mon, 20 Feb 2006 09:47:46 +0000, Neil wrote:
> Philip Chee wrote:

>>What I want to do is to programatically add *http:* urls (not *chrome:*).
> Then I fail to understand how window.sidebar.addPanel fails to work for you.

Error: window.sidebar.addPanel is not a function
Source File: chrome://xsidebar/content/xsidebarUtils.js
Line: 800

if (linkNode.getAttribute("rel") == "sidebar") {
   // This is the Opera convention for a special link that - when clicked -
allows
   // you to add a sidebar panel.  We support the Opera convention here.
The link's
   // title attribute contains the title that should be used for the sidebar
panel.
   window.sidebar.addPanel(wrapper.getAttribute("title"), wrapper.href, "");
//XXX:not working ?!?
   event.preventDefault();
   return false;
}

Phil
-- 
Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]Silly Wabbit, QWKs are for kids!
* TagZilla 0.059


More information about the Project_owners mailing list