以下のコードを HTML ページに追加するとすぐに、次のようになります。
Uncaught TypeError: Object function (constrname) {
if(this.constructor.name===constrname){
return true;
}
return false;
} has no method 'exec'
これは、バグの原因となるプロトタイプです。
Object.prototype.isInstanceOf=function(constrname) {
if(this.constructor.name===constrname){
return true;
}
return false;
};
プロトタイプを追加すると、 jQuery が壊れているようです。
新しいプロトタイプを Object 型に定義するときに、いくつかの型を除外できますか? たとえば、除外: jQuery タイプ、...
次のコードを試しましたが、無駄です:
Object.prototype.isInstanceOf=function(constrname) {
if(!(this instanceof jQuery)){
//write here code
}
}