Project

Profile

Help

Bug #1591

closed

Internet Explorer - Ver 8 and previous: Setting a class attribute value gives '[object]' instead of the real string value

Added by Philip Fearon over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
2012-07-19
Due date:
% Done:

100%

Estimated time:
Platforms:

Description

This only affects IE versions 8 and previous:

Dynamically setting the value of a class to any string value results in the '[object]' value being assigned instead of the real string value. For example:

<xsl:tempate match="item">
<li class="{'open'}">
   <xsl:value-of select="."/>
</li>
</xsl:template>

Will result in the HTML element: <li class="[object]">First Item</li>

Cause: IE8 and previous versions treat the class attribute as a property of an element called 'className'. Saxon-CE manages this when reading attributes, but when writing, it was only setting the class attribute value. Setting the 'className' property resolves the issue.

Please register to edit this issue

Also available in: Atom PDF