XBL binding does not work on embed tag

NEW
Unassigned

Status

()

Core
XBL
16 years ago
9 years ago

People

(Reporter: Stefan Kinitz, Unassigned)

Tracking

(Depends on: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME)

(Reporter)

Description

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
certainly....
Whiteboard: DUPEME
(Reporter)

Comment 2

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

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?

Updated

15 years ago
Status: UNCONFIRMED → NEW
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:

http://sanfrancisco.citysearch.com/

Specifically (as far as I can tell) this HTML:
<!-- Flash Mantel code START -->
<script LANGUAGE="JavaScript1.1"
SRC="http://ads.as4x.tmcs.net/js.ng/site=cs&pagepos=75&adsize=300x250&page=home&city=sanfrancisco&context=generic?ord='+bust+'">
</script>
 <!-- Flash Mantel code END -->

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

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.

http://www.squarefree.com/xbl-test/embedtest2.htm

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. 
http://www.squarefree.com/userstyles/xbl.html

Comment 10

15 years ago
jesse:
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:

embed[src*=".swf"]
(Reporter)

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

Updated

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