Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

No ticket: Set async to true instead of "async" in ajax/script.js (prop vs. attr) #1039

Closed
wants to merge 1 commit into from

3 participants

@Krinkle

follows-up ab3ba4a
@rwldrn

@Krinkle Krinkle Set async to true instead of "async" in ajax/script.js (prop vs. attr)
Someone confused properties and attributes.

This never actually caused any issues, thanks to the stable
enough internal boolean casting of all supported browsers, and
the fact that we remove it from the dom before any other script
could practically try to read this property.

Follow-up: ab3ba4a
b84a74e
@rwaldron rwaldron closed this in 4fed8eb
@rwaldron
Collaborator

LGTM :+1:

@jaubourg
Collaborator

FYI, this had been set to "async" back in the days because older FF had a problem with true (ie. it just didn't work with true). This has been fixed by now so \o/.

@Krinkle

@jaubourg In that case a comment wouldn't have hurt :wink: (since it is sort of incorrect to assign a string value to a boolean property). From tracing it back with git-blame the entire script was introduced as a whole, and no mention anywhere in the commit-msg or code of why this was.

I did find an old forum thread.

Anyhow, passé now.

@jaubourg
Collaborator

Was it when John commited the whole ajax rewrite? Anyway, yeah, I should have added a comment about this :/

@mescoda mescoda referenced this pull request from a commit in mescoda/jquery
@Krinkle Krinkle Set async to true instead of async (prop vs. attr). Closes gh-1039 63fa667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 21, 2012
  1. @Krinkle

    Set async to true instead of "async" in ajax/script.js (prop vs. attr)

    Krinkle authored
    Someone confused properties and attributes.
    
    This never actually caused any issues, thanks to the stable
    enough internal boolean casting of all supported browsers, and
    the fact that we remove it from the dom before any other script
    could practically try to read this property.
    
    Follow-up: ab3ba4a
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/ajax/script.js
View
2  src/ajax/script.js
@@ -40,7 +40,7 @@ jQuery.ajaxTransport( "script", function(s) {
script = document.createElement( "script" );
- script.async = "async";
+ script.async = true;
if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
Something went wrong with that request. Please try again.