Skip to content

Commit

Permalink
Adjust version detection for IE9: CSS3 is only supported natively in …
Browse files Browse the repository at this point in the history
…documentMode=9 (regardless of browser mode) so base the decision to attach on that rather than the detected IE version.
  • Loading branch information
Jason Johnston committed Mar 31, 2011
1 parent 5cd48c9 commit 75a20d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sources/Element.js
Expand Up @@ -97,7 +97,7 @@ PIE.Element = (function() {
initAncestorPropChangeListeners();

// Add to list of polled elements in IE8
if( PIE.ie8DocMode === 8 ) {
if( PIE.ieDocMode === 8 ) {
PIE.Heartbeat.observe( update );
}

Expand Down Expand Up @@ -310,7 +310,7 @@ PIE.Element = (function() {
}

// Remove from list of polled elements in IE8
if( PIE.ie8DocMode === 8 ) {
if( PIE.ieDocMode === 8 ) {
PIE.Heartbeat.unobserve( update );
}
// Stop onresize listening
Expand Down
2 changes: 1 addition & 1 deletion sources/Heartbeat.js
Expand Up @@ -4,7 +4,7 @@
* times every second to make sure the elements have the correct position and size.
*/

if( PIE.ie8DocMode === 8 ) {
if( PIE.ieDocMode === 8 ) {
PIE.Heartbeat = new PIE.Observable();
setInterval( function() { PIE.Heartbeat.fire() }, 250 );
}
2 changes: 1 addition & 1 deletion sources/PIE_API.js
Expand Up @@ -8,7 +8,7 @@
* @param {Element} el
*/
PIE[ 'attach' ] = function( el ) {
if (PIE.ieVersion < 9) {
if (PIE.ieDocMode < 9) {
PIE.Element.getInstance( el ).init();
}
};
Expand Down
2 changes: 1 addition & 1 deletion sources/PIE_open.js
Expand Up @@ -40,4 +40,4 @@ if( !PIE ) {
}

// Detect IE8
PIE.ie8DocMode = PIE.ieVersion === 8 && doc.documentMode;
PIE.ieDocMode = doc.documentMode || PIE.ieVersion;

0 comments on commit 75a20d5

Please sign in to comment.