[Project_owners] bug or feature?

Justin Wood (Callek) 116057-nospam at bacon.NoSpamPlease.qcc.mass.edu
Sat Jan 29 12:12:31 EST 2005


Matthew Wilson wrote:
> Konstantin Svist wrote:
> 
>> Not quite sure if this is the right mailing list for this question but
>> what the heck...
>>
>> I'm trying to convert BGSOUND tag into an EMBED tag (so pages with
>> BGSOUND will make sound in firefox). I've just found out that when
>> encountered with an unknown tag like BGSOUND, Firefox moves it into
>> the head section of HTML.
>>
>> for example this:
>> <html>
>>  <head></head>
>>  <body>
>>   <bgsound src='./canyon.mid'>
>>  </body>
>> </html>
>>
>> becomes this (see live HTML via javascript calls or using the
>> "Generated Source" bookmarklet):
> 
> 
> (or with DOM Inspector)
> 
>> <html>
>>  <head>
>>   <bgsound src='./canyon.mid'>
>>  </head>
>>  <body>
>>  </body>
>> </html>
>>
>>
>> Because of this, replaceChild() doesn't work in my case (embed is not
>> played if located in HEAD section).
>> Is this a bug or is it expected behavior of the browser?
> 
> 
> Probably occurs as a side-effect of the fact that BGSOUND is not a 
> standard HTML element.
> 
> Matthew
> 

<EMBED> will work in IE6 at the least, and Opera etc.  use replaceChild 
if you are in IE, to turn it into bgsound rather than the other way 
around, let your page validate

~Justin Wood


More information about the Project_owners mailing list