Skip to content

Update notes.xsl #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entries/jQuery.data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jQuery.data( document.body, "bar", "test" );
</code></pre>
</longdesc>
<note id="no-data-on-xml" type="additional"/>
<note id="data-doesnt-accept-undefined" type="additional" data-title="jQuery.data" data-parameters="el, &quot;name&quot;"/>
<note id="jquery-data-doesnt-accept-undefined" type="additional" data-title="jQuery.data" data-parameters="el, &quot;name&quot;"/>
<example>
<desc>Store then retrieve a value from the div element.</desc>
<code><![CDATA[
Expand Down
5 changes: 4 additions & 1 deletion notes.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<xsl:template name="note">
<xsl:choose>
<xsl:when test="@id = 'data-doesnt-accept-undefined'">
<code>undefined</code> is not recognised as a data value. Calls such as <code><xsl:value-of select="@data-title" />( <xsl:value-of select="@data-parameters" />, undefined )</code> will return the corresponding data for "name", and is therefore the same as <code><xsl:value-of select="@data-title" />( <xsl:value-of select="@data-parameters" /> )</code>.
<code>undefined</code> is not recognized as a data value. Calls such as <code><xsl:value-of select="@data-title" />( <xsl:value-of select="@data-parameters" />, undefined )</code> will return the jQuery object that it was called on, allowing for chaining.
</xsl:when>
<xsl:when test="@id = 'jquery-data-doesnt-accept-undefined'">
<code>undefined</code> is not recognized as a data value. Calls such as <code><xsl:value-of select="@data-title" />( <xsl:value-of select="@data-parameters" />, undefined )</code> will return the corresponding data for "name", and is therefore the same as <code><xsl:value-of select="@data-title" />( <xsl:value-of select="@data-parameters" /> )</code>.
</xsl:when>
<xsl:when test="@id = 'dimensions-number'">
The number returned by dimensions-related APIs, including <code><xsl:value-of select="@data-title"/></code>, may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
Expand Down