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

Re: Reinitializing OBJECT and EMBED - data and type changes

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Wed, 23 Apr 2008 18:51:01 -0400
Message-ID: <6b9c91b20804231551p420ab129g5bd094be2e967924@mail.gmail.com>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: public-html@w3.org

On 4/23/08, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Michael A. Puls II wrote:
> > What if you have this:
> >
> > <object type="application/x-java-applet">
> > <param name="code" value"MyJavaClass">
> > </object>
> >
> > and change the value of the param to MyNewJavaClass
> >
>  Ideally that would trigger the load on its own, without having to do a
> "foo.type = foo.type" hack.

O.K., so reinitializing when a param changes might be something would
should consider also.

> > What is your opinion on making it so type and data changes don't
> > reinitialize and having a reinitialize() function instead?
> >
>  I would be fine with that from a "how easy is it to implement this?"
> perspective, but it introduces hysteresis effects where the state of the DOM
> is not enough to determine what the state of the object is.  I think those
> should be avoided, personally.

O.K.  The one concern I have about data or type changes (or even param
changes) causing the object to reinitialize is that if you need to
change multiple things, you end up reinitializing for each change.
.reinitialize() would avoid that I think.

However, *if* for example, changing the values with
obj.attributes["type"].value and param.attribute["value"].value didn't
cause a reinitialization, they could be used as a workaround for
multiple changes.

> > var obj = document.getElementById("test");
> > obj.type = "something";
> > obj.parentNode.replaceChild(obj.cloneNode(true), obj);
> >
> > , after doing the replacement, 'obj' would no longer point to the
> > right object and I would have to manually update 'obj'.  As an
> > implementor, is it trivial for you to solve this problem *IF* it was
> > necessary to go that route?
> >
>  I'm not quite sure what you're asking here.

I'll rephrase and get back to you on that. I think I have a good way
to explain what I mean.


Received on Wednesday, 23 April 2008 22:51:43 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:32 UTC