XBL binding does not work on embed tag




16 years ago
9 years ago


(Reporter: Stefan Kinitz, Unassigned)


(Depends on: 1 bug)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: DUPEME)



16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130

Trying to bind an embed tag with xbl does not seem to work at all

Reproducible: Always

Steps to Reproduce:
1. write a binding (a simple additional attribute or something)
2. bind it to an img and an embed tag
3. use dom inspector to test the tags

Actual Results:  
3. the img tag has a new attribute, the embed tag has none

Expected Results:  
the embed tag should have a new attribute like the img tag
This is a dup of that bug about the prototype chain for plugins, almost
Whiteboard: DUPEME

Comment 2

16 years ago
the binding:
<?xml version="1.0"?>
<bindings id="myBindings" xmlns="http://www.mozilla.org/xbl">
	<binding id="img">
			<field name="tstsrc"/>
			<property name="src">
					try {
						this.tstsrc = this.src;
						this.setAttribute("src", null);
					} catch(e) {
						window.alert(this + ": " + e);

The exception says:
exception... "Illegal operation on WrappedNative prototype object"
nsresult: "0x80570003c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"
location: "JS frame :: <<unknown filename>> :: onxblconstructor :: line 3"
data: no

BTW: Can anyone show me a doc that reveals all the secrets about the difference
between this.tstsrc = val and this.setAttribute("tstsrc", val) and what does
what and how to use? I'm currently guessing wild it seems?


15 years ago
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All

Comment 3

15 years ago
This bug prevents the popular "Flash click to view" extension from working on
sites that use <embed> rather than <object> for Flash.

Comment 4

15 years ago
Not 100% sure this is the same, but this flash bypasses the flash click-to-view
plugin as well and might be a helpful test-case:


Specifically (as far as I can tell) this HTML:
<!-- Flash Mantel code START -->
<script LANGUAGE="JavaScript1.1"
 <!-- Flash Mantel code END -->

Please retest this in tomorrow's build now that bug 127418 is fixed.

Comment 6

15 years ago
Works with embeds within objects and pure embeds and Mozilla/5.0 (Windows; U;
Windows NT 5.0; de-AT; rv:1.7a) Gecko/20040106.
The XBL binding shows up, but Flash-Click-to-View still doesn't work.  There's
probably another bug open about anonymous content and plugins, but I can't find
it right now.

Testcase: http://mavra.perilith.com/~luser/testembed.html

Comment 8

15 years ago
The XBL binding's <constructor> runs, but the <content> seems to be ignored.  I
see the same with OBJECT elements.  The XBL flash blocker only works reliably in
the case of a broken OBJECT (missing "data" and "type" params) containing a
working EMBED.


Comment 9

15 years ago
I rewrote the Flash Click-to-View XBL to do everything in JavaScript instead of
using <content>.  It works with EMBED tags now. 

Comment 10

15 years ago
Windows 2000, firefox 0.8, fresh profile
embedtest2.htm without your code:
- div -> "click to play object" -> working
- embed, object, object cont embed -> show up
- broken object -> "click to play object" -> working

with your code:
- div -> "click to play object" = working
- embed -> shows up
- object, object cont embed -> "click to play" -> no flash after clicking
- broken object -> "click to play object" -> working

So still no sucess with embed on my machine.

Comment 11

15 years ago
Joachim: embedtest2.html is for testing this bug, not for testing the new
version of my XBL flash blocker.  If you want to use it to test the new version
of my flash blocker, you have to remove the <style> elements from embedtest2.html.

Comment 12

15 years ago
Oh sorry for this mistake. Now it works.
I was fooled because on my example page (www.hardtecs4u.com), the banners still
showed up.
There seems to be a unusual embed tag:

<EMBED src="/werbung/listan_banner_468.swf" quality="high" width="468" height="60">

I simply added another rule for the css:


Comment 13

15 years ago
As I see it this bug is fixed. If you still have problems with fctv I suggest
you open a seperate bug and we close this one as fixed?
QA Contact: ian → xbl


9 years ago
Assignee: hyatt → nobody
You need to log in before you can comment on or make changes to this bug.