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

addBehavior throws an exception in IE6 SP2 #31

Closed
labaneilers opened this Issue Nov 1, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@labaneilers

labaneilers commented Nov 1, 2011

This line, in the block to support IE 5+, throws an exception

if ( div.addBehavior ) {
div.addBehavior( "#default#userdata" ); //throws "unspecified error" in IE6 SP2

I've verified this on several of our QA lab boxes with IE6 SP2. The versions affected (so far): 6.0.3790.3959 SP2

@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Nov 1, 2011

Contributor

Do you have restricted security settings on those boxes? This should work in all IE 6 installs.

Contributor

scottgonzalez commented Nov 1, 2011

Do you have restricted security settings on those boxes? This should work in all IE 6 installs.

@labaneilers

This comment has been minimized.

Show comment
Hide comment
@labaneilers

labaneilers Nov 2, 2011

You're right! The problem is not the version of IE6, but the security settings. If jack them up to block all ActiveX controls (even those marked "safe for scripting"), addBehavior throws an exception. Unfortunately, the addBehavior method still exists, so simply testing for its existence doesn't protect you.

Also, because the code's running in an IIFE, it gets run on every page on which amplify is included, even when its not used.

So- I think you still need the try/catch to fail gracefully. Plenty of poor folks out there are stuck in corporate hell with locked down IE6.

labaneilers commented Nov 2, 2011

You're right! The problem is not the version of IE6, but the security settings. If jack them up to block all ActiveX controls (even those marked "safe for scripting"), addBehavior throws an exception. Unfortunately, the addBehavior method still exists, so simply testing for its existence doesn't protect you.

Also, because the code's running in an IIFE, it gets run on every page on which amplify is included, even when its not used.

So- I think you still need the try/catch to fail gracefully. Plenty of poor folks out there are stuck in corporate hell with locked down IE6.

@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Nov 2, 2011

Contributor

Closing as duplicate of #17.

Contributor

scottgonzalez commented Nov 2, 2011

Closing as duplicate of #17.

@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Nov 2, 2011

Contributor

This is fixed now.

Contributor

scottgonzalez commented Nov 2, 2011

This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment