Fixed: new file API test caused 'Cannot find function setAttribute in object [object Object]' unit test error.

This commit is contained in:
Alexander Ljungberg
2013-02-13 13:56:28 +00:00
parent 3ba0f58738
commit b59440584d
+7 -2
View File
@@ -230,8 +230,13 @@ if (typeof document != "undefined")
}
// Detect FileAPI support
DOMInputElement.setAttribute("type", "file");
PLATFORM_FEATURES[CPFileAPIFeature] = !!DOMInputElement["files"];
if (typeof DOMInputElement.setAttribute === "function")
{
DOMInputElement.setAttribute("type", "file");
PLATFORM_FEATURES[CPFileAPIFeature] = !!DOMInputElement["files"];
}
else
PLATFORM_FEATURES[CPFileAPIFeature] = NO;
}
function CPFeatureIsCompatible(aFeature)