lupor
lupor

Reputation: 138

JS: Prototype pattern compatibility

I am a big fan of the constructor/prototype pattern when writing JavaScript. Some time ago, I was told that there are some compatiblity isssues with older browsers (IE7, 8 on XP), but I could not find a ressource to verfiy this claim.

So, my question is: Are there any known compatibility issues when using constructor functions / prototypes in JavaScript? Extra: Could these potential problems be avoided by using the module pattern?

Upvotes: 2

Views: 64

Answers (1)

Bergi
Bergi

Reputation: 664990

Are there any known compatibility issues when using constructor functions / prototypes in JavaScript?

No. However, "class" inheritance should be done using Object.create, which requires a shim for old IEs.

Could these potential problems be avoided by using the module pattern?

No.

Upvotes: 1

Related Questions