Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Embedding Flash SWF in XUL

109 views
Skip to first unread message

Filip Tepper

unread,
Jun 24, 2008, 8:51:27 AM6/24/08
to
Hi,

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?

Fred

unread,
Jun 24, 2008, 10:09:46 AM6/24/08
to dev-te...@lists.mozilla.org
On Tue, Jun 24, 2008 at 7:51 AM, Filip Tepper <fi...@tepper.pl> wrote:
> code stopped working:
>
> [XUL]
> <binding id="blipfox-embed-youtube">
> <content>
> <html:embed
> xbl:inherits="src=src"
> width="240"
> type="application/x-shockwave-flash" />

Is the 'xbl' namespace properly declared?

> </content>
> </binding>
>

Filip Tepper

unread,
Jun 24, 2008, 10:24:25 AM6/24/08
to
On Jun 24, 4:09 pm, Fred <phr...@gmail.com> wrote:

> 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.

Fred

unread,
Jun 24, 2008, 11:08:57 AM6/24/08
to dev-te...@lists.mozilla.org
Sounds like a bug in which case I can only give debwging advice.
(I don't fix bwgs, I only post them. :-)

- 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)

Filip Tepper

unread,
Jun 24, 2008, 3:19:19 PM6/24/08
to
On Jun 24, 5:08 pm, Fred <phr...@gmail.com> wrote:

> ...or a work around
> - Could you use the xul:iframe rather than the html:embed?
> (presuming the bwg is with html:embed)

Works!

Thanks! :-)

Daniel Kirsch

unread,
Jun 25, 2008, 6:52:15 PM6/25/08
to
Filip Tepper schrieb:
> xbl:inherits="src=src"

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

0 new messages