I have a very simple Xul app that shows a browser component, and with CRTL+L
you can type a new URL to go.
But, for some reason (I'm starting to think it's some Xul bug), the xml is
not recognizing the browser element. The error is:
> Error: browser.loadURI is not a function Source File:
> chrome://test/content/test.xml Line: 15
*My test.xul:*
*
<?xml version="1.0" encoding="UTF-8"?>**
**<!-- Bindings -->
**<?xml-stylesheet href="chrome://test/content/test.css" type="text/css"?>**
**<!-- TV Desktop -->
**<window id="testWindowID" title="Test" width="640" height="480"
** xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
**
** <browser id="browserID" type="content" src="http://www.google.com.br/"
flex="1" />**
**</window>
*
*My test.css*
**
*#browserID { -moz-binding: url("chrome://test/content/test.xml#test"); }*
*My test.xml (the XBL):*
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="test">
<handlers>
<handler event="keypress" modifiers="control"
keycode="DOM_VK_L">
<![CDATA[
var url = window.prompt('URL address:','');
dump("url = " + url + "\n");
var browser = document.getElementById("browserID");
dump("element = " + browser.nodeName + "\n");
browser.loadURI(url);
]]>
</handler>
</handlers>
</binding>
</bindings>
So strange...
*
Wellington B. de Carvalho
*
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
XUL News Wire - http://xulnews.com
XUL Job Postings - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org
_______________________________________________
xul-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xul-talk