W3C home > Mailing lists > Public > public-html@w3.org > April 2008

Re: Reinitializing OBJECT and EMBED - data and type changes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 23 Apr 2008 12:49:02 -0500
Message-ID: <480F768E.3000609@mit.edu>
To: "Michael A. Puls II" <shadow2531@gmail.com>
CC: public-html@w3.org

Michael A. Puls II wrote:
> I assume the paragraph means: "If data or type is added or removed (in
> any way) or modified (in any way, even to the same exact value)

I would hope that the "even to the same exact value" part is not actually the 

> var obj = document.getElementsByTagName("object")[0];
> obj.addEventListener("DOMAttrModified", function(e) {

Note that setting an attribute to the value it already has doesn't fire 
DOMAttrModified in at least some UAs, so this pseudo-code doesn't quite match 
your prose description.

> Opera and Firefox currently support reinitializing an object when you
> change the type. However, it only works in certain cases.  Switching
> an object to a Java applet from the Windows media plugin is an example
> of one situation that doesn't work.

Assuming we're talking about Firefox 3 (which handles this very differently from 
Firefox 2; I don't even remember what Firefox 2 does, exactly), type attribute 
changes do not cause any reinitialization.  This can be changed, of course.

Received on Wednesday, 23 April 2008 17:50:38 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:30 UTC