\r
isArray :\r
new Function( 'v',\r
- X.UA.IE < 5.5 ?\r
+ X_UA.IE < 5.5 || X_UA.NetFront < 4 ? // netfront3.4 は html に instanceof をすると error になる\r
'return v&&v.push===Array.prototype.push' : // win ie5-, MacIE5.2\r
- X.UA.IE ?\r
+ X_UA.IE ?\r
'return v&&Object.prototype.toString.call(v)==="[object Array]"' :\r
'return v instanceof Array'\r
),\r
},\r
\r
isString : function( v ){\r
- return typeof v === 'string'; // v === v + '';\r
+ return typeof v === 'string'; // v === v + ''; // 文字列の加算は IE で遅いかも。\r
},\r
\r
isNumber : function( v ){\r
\r
isHTMLElement :\r
new Function( 'v',\r
- ( X.UA.IE4 || X.UA.MacIE ) ?\r
+ ( X_UA.IE4 || X_UA.MacIE ) ?\r
'return v&&v.tagName&&v.insertAdjacentHTML&&true' : // ie4 or MacIE5.23, v.all <- error\r
+ X_UA.NetFront < 4 ?\r
+ 'return v&&v.nodeType===1' : // instanceof not a function. netfront3.4 は html に instanceof をすると error になる\r
window[ 'HTMLElement' ] ?\r
'return v instanceof HTMLElement' :\r
//window[ 'Element' ] ?\r
),\r
\r
/*\r
- * new Image した場合に HTMLElement の img が作られるブラウザもある\r
+ * new Image した場合に HTMLImageElement が作られるブラウザと,そうでないブラウザ(IE8-)がある\r
*/ \r
isImage :\r
function( v ){\r
if( v && v.constructor === window.Image ) return true;\r
if( v && window.HTMLImageElement && v.constructor === window.HTMLImageElement ) return true; // ie6- は constructor が undef、HTMLImageElement が undef なので、HTMLElement の存在確認が必要\r
- if( X.UA.WebKit < 525.13 ){ // Safari3-\r
+ if( X_UA.WebKit < 525.13 ){ // Safari3-\r
if( v && v.src !== undefined && v.onload !== undefined && X.Type.isNumber( v.height ) && X.Type.isNumber( v.width ) && X.Type.isBoolean( v.complete ) ){\r
return true;\r
};\r