Skip to content

Commit ebb139a

Browse files
authored
All: Update the link to html5shiv
Change the html5shiv link from https://code.google.com/p/html5shiv/ to https://github.com/afarkas/html5shiv to which the former already 301-redirects. We've had some code.google.com-related spider-check crawler errors which this may also eliminate. Ref jquerygh-1275
1 parent 764a156 commit ebb139a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: entries/html.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $( "div.demo-container" ).html(function() {
118118
});
119119
</code></pre>
120120
<p>Given a document with six paragraphs, this example will set the HTML of <code>&lt;div class="demo-container"&gt;</code> to <code>&lt;p&gt;All new content for &lt;em&gt;6 paragraphs!&lt;/em&gt;&lt;/p&gt;</code>.</p>
121-
<p>This method uses the browser's <code>innerHTML</code> property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all <code>href</code> properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate <a href="https://code.google.com/p/html5shiv/">compatibility layer</a>.</p>
121+
<p>This method uses the browser's <code>innerHTML</code> property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all <code>href</code> properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate <a href="https://github.com/afarkas/html5shiv">compatibility layer</a>.</p>
122122
<p>To set the content of a <code>&lt;script&gt;</code> element, which does not contain HTML, use the <a href="/text/"><code>.text()</code></a> method and not <code>.html()</code>.</p>
123123
<p><strong>Note:</strong> In Internet Explorer up to and including version 9, setting the text content of an HTML element may corrupt the text nodes of its children that are being removed from the document as a result of the operation. If you are keeping references to these DOM elements and need them to be unchanged, use <code>.empty().html( string )</code> instead of <code>.html(string)</code> so that the elements are removed from the document before the new string is assigned to the element.</p>
124124
</longdesc>

Diff for: entries/jQuery.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ $( myForm.elements ).hide();
178178
<p>By default, elements are created with an <code>.ownerDocument</code> matching the document into which the jQuery library was loaded. Elements being injected into a different document should be created using that document, e.g., <code>$("&lt;p&gt;hello iframe&lt;/p&gt;", $("#myiframe").prop("contentWindow").document)</code>.</p>
179179
<p>If the HTML is more complex than a single tag without attributes, as it is in the above example, the actual creation of the elements is handled by the browser's <code>.innerHTML</code> mechanism. In most cases, jQuery creates a new <code>&lt;div&gt;</code> element and sets the <code>innerHTML</code> property of the element to the HTML snippet that was passed in. When the parameter has a single tag (with optional closing tag or quick-closing) — <code>$( "&lt;img&#xA0;/&gt;" )</code> or <code>$( "&lt;img&gt;" )</code>, <code>$( "&lt;a&gt;&lt;/a&gt;" )</code> or <code>$( "&lt;a&gt;" )</code> — jQuery creates the element using the native JavaScript <code>.createElement()</code> function.</p>
180180
<p>When passing in complex HTML, some browsers may not generate a DOM that exactly replicates the HTML source provided. As mentioned, jQuery uses the browser's <code>.innerHTML</code> property to parse the passed HTML and insert it into the current document. During this process, some browsers filter out certain elements such as <code>&lt;html&gt;</code>, <code>&lt;title&gt;</code>, or <code>&lt;head&gt;</code> elements. As a result, the elements inserted may not be representative of the original string passed.</p>
181-
<p>Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all <code>href</code> properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate <a href="https://code.google.com/p/html5shiv/">compatibility layer</a>.</p>
181+
<p>Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all <code>href</code> properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate <a href="https://github.com/afarkas/html5shiv">compatibility layer</a>.</p>
182182
<p>To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:</p>
183183
<pre><code>$( "&lt;a href='https://jquery.com'&gt;&lt;/a&gt;" );</code></pre>
184184
<p>Tags that cannot contain elements may be quick-closed or not:</p>

0 commit comments

Comments
 (0)