ouyang789987 / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Parse Error in Safari due to style attribute sybtax #486

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a style class to your swfObject
You can do this by hand OR more appropriately ( since it does it wrong ) with 
the swfobject html generator.
2. In Safari swf embedding will fail due to a parse error.

What is the expected output? What do you see instead?
I expect swfobject to embed my swf. Especially when I use the supplied 
generator.

What version of the product are you using? On what operating system?
Osx
swfObject 2.2

Please provide any additional information below.
How to fix:
http://www.developsigner.com/blog/2010/01/22/swfobject-2-2-and-safari-gotcha

Original issue reported on code.google.com by kristofe...@gmail.com on 19 Jul 2010 at 6:10

GoogleCodeExporter commented 9 years ago
As stated in the docs, you cannot use class in the attributes object.

"You can add the following often-used optional attributes to the object element:

- id (NOTE: when undefined, the object element automatically inherits the id 
from the alternative content container element)
name
- styleclass (used instead of class, because this is also an ECMA4 reserved 
keyword)
- align

Check the generator, and what is sets - It uses styleclass rather than class

http://www.bobbyvandersluis.com/swfobject/generator/index.html

Original comment by aran.rhee@gmail.com on 20 Jul 2010 at 10:25