[whatwg] <object> behavior
Michael A. Puls II
shadow2531 at gmail.com
Mon Sep 14 17:59:27 PDT 2009
On Mon, 14 Sep 2009 02:10:22 -0400, Ian Hickson <ian at hixie.ch> wrote:
> On Thu, 3 Sep 2009, Michael A. Puls II wrote:
>> On Wed, 02 Sep 2009 17:39:00 -0400, Ian Hickson <ian at hixie.ch> wrote:
>> > On Thu, 27 Aug 2009, Michael A. Puls II wrote:
>> > >
>> > > Here's an example that uses a more modern plug-in that shows what
>> > > browsers do.
>> > >
>> > > window.onload = function() {
>> > > var obj = document.createElement("object");
>> > > obj.type = "application/x-shockwave-flash";
>> > > obj.data = "http://adobe.com/shockwave/welcome/flash.swf";
>> > > obj.width = "320";
>> > > obj.height = "240";
>> > > //document.body.appendChild(obj);
>> > > //obj.style.display = "none";
>> > > setTimeout(function() {
>> > > alert(obj.SetVariable);
>> > > }, 1000);
>> > > };
>> > >
>> > > In other words, for a plug-in to be initialized (and scriptable if
>> it's
>> > > capable):
>> > >
>> > > 1. Its element must be attached to the document.
>> >
>> > I'm told this is considered a bug.
>>
>> O.K., so once that's fixed in browsers, if I do:
>>
>> var obj = document.createElement("object");
>> obj.type = "application/x-shockwave-flash";
>> obj.data = "file.swf"
>> obj.appendParam("quality", "low");
>>
>> , will that load as soon as I set @type (according to HTML5) and result
>> in
>> @data and the param not being honored because the plug-in already
>> initialized?
>Hm, good point.
> Fixed.
Thanks
--
Michael
More information about the whatwg
mailing list