Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
fixed bug with IE version to use right XHr request method in IE7
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckcarpenter committed Jun 6, 2014
1 parent cdde3e3 commit ef0a71b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
"strict": false,
"trailing": true,
"smarttabs": true,
"globals": {"define": false}
"globals": {
"define": false,
"XDomainRequest": false,
"ActiveXObject": false
}
}
13 changes: 8 additions & 5 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
'use strict'
module.exports = (grunt) ->
# load all grunt tasks
# this assumes matchdep, grunt-contrib-watch, grunt-contrib-coffee,
# this assumes matchdep, grunt-contrib-watch, grunt-contrib-coffee,
# grunt-coffeelint, grunt-contrib-clean, grunt-contrib-uglify is in the package.json file
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks

# Timing on Grunt tasks completion
require('time-grunt') grunt

grunt.initConfig
# load in the module information
pkg: grunt.file.readJSON 'package.json'
Expand All @@ -18,7 +21,7 @@ module.exports = (grunt) ->
' * Copyright (c) <%= grunt.template.today("yyyy") %>' +
' | <%= pkg.authors %>;\n' +
'**/\n'


# clear out any unneccessary files
clean: ['js/<%= pkg.name %>.min.js']
Expand All @@ -40,9 +43,9 @@ module.exports = (grunt) ->
files:
'js/<%= pkg.name %>.min.js': 'js/<%= pkg.name %>.js'

## TODO: add some tests
## TODO: add some tests


grunt.registerTask 'default', [
'clean'
'jshint'
Expand Down
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
<link rel="stylesheet" type="text/css" href="css/general.css" />
<!-- CSS containing @import lines, test importing of additional sheets -->
<link rel="stylesheet" type="text/css" href="css/importer.css" />
<!-- ignore.css shows in normal browsers, but ones where we expect the REM.js to
<!-- ignore.css shows in normal browsers, but ones where we expect the REM.js to
run then the REM rules should not get parsed.
-->
<link rel="stylesheet" type="text/css" href="css/ignore.css" data-norem />

</head>
<body>
<div class="test">Hello World!</div>
Expand Down
2 changes: 1 addition & 1 deletion js/rem.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
return v > 4 ? v : undef;
}());

if ( ie >= 7 ){ //If IE is greater than 6
if ( ie >= 8 ){ //If IE is greater than 7
// This targets modern browsers and modern versions of IE,
// which don't need the "new" keyword.
xhr.onreadystatechange = function () {
Expand Down
6 changes: 3 additions & 3 deletions js/rem.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"karma-ie-launcher": "~0.1.1",
"karma-firefox-launcher": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.0",
"karma-safari-launcher": "~0.1.1"
"karma-safari-launcher": "~0.1.1",
"time-grunt": "^0.3.2"
},
"dependencies": {}
}

0 comments on commit ef0a71b

Please sign in to comment.