After switching with my Firefox extension to Firefox 3 the following
code stopped working:
[XUL]
<binding id="blipfox-embed-youtube">
<content>
<html:embed
xbl:inherits="src=src"
width="240"
type="application/x-shockwave-flash" />
</content>
</binding>
[JS]
var embed = document.createElement('box');
embed.className = 'blipfox-embed-youtube';
embed.setAttribute('src', 'http://www.youtube.com/v/' + RegExp.$3);
messageContainer.appendChild(embed);
This works as expected in Firefox 2.
I've made made some tests and it seems, that it's
xbl:inherits="src=src" fault, because as long as I use the following
code:
[XUL]
<binding id="blipfox-embed-youtube">
<content>
<html:embed
src="http://whatever/swf/file.swf"
width="240"
type="application/x-shockwave-flash" />
</content>
</binding>
everything works as expected.
Any ideas?
Is the 'xbl' namespace properly declared?
> </content>
> </binding>
>
> Is the 'xbl' namespace properly declared?
Yes, it is. xbl:inherits work for all the elements except for
html:embed (works for xul:label and others).
As I mentioned earlier - this code works as expected in Firefox 2,
problems occur only in Firefox 3.
- Add a constructor to the xbl from which to examine/print the object
as it is being bound
It may be that the src is not being embedded at the right time.
- Change 'src=src' to 'src'.
- Make the src value in the two examples identical.
- Narrow the problem, what are the elements/attributes that do
inherits correctly?
...or a work around
- Could you use the xul:iframe rather than the html:embed?
(presuming the bwg is with html:embed)
> ...or a work around
> - Could you use the xul:iframe rather than the html:embed?
> (presuming the bwg is with html:embed)
Works!
Thanks! :-)
Why do you reassing the src attribute here? Why not just:
xbl:inherits="src"
Does this work or does it show the same behaviour?
Daniel