Skip to content

Missing global attributes in IE9 #1

Description

@zcfan

IE9 have all four attributes and pass the following test, but it shouldn't because it doesn't have scrollX and scrollY.

es5-polyfill/dist/polyfill.js

Lines 1119 to 1121 in 3f186b5

if ('innerWidth' in global && 'innerHeight' in global && 'pageXOffset' in global && 'pageYOffset' in global) {
return;
}

According to this snippet, the polyfill complete six global attributes instead of four. I suggest we test all attributes it affected to make IE9 environment more flat.

es5-polyfill/dist/polyfill.js

Lines 1134 to 1157 in 3f186b5

Object.defineProperties(global, {
innerWidth: {
get: function () {
return docEl.clientWidth;
}
},
innerHeight: {
get: function () {
return docEl.clientHeight;
}
},
pageXOffset: {
get: scrollX
},
pageYOffset: {
get: scrollY
},
scrollX: {
get: scrollX
},
scrollY: {
get: scrollY
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions