Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing global attributes in IE9 #1

Open
zcfan opened this issue May 23, 2019 · 0 comments
Open

Missing global attributes in IE9 #1

zcfan opened this issue May 23, 2019 · 0 comments

Comments

@zcfan
Copy link
Member

zcfan commented May 23, 2019

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
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant