diff --git a/AppKit/CPCompatibility.j b/AppKit/CPCompatibility.j index b9469f692..39d10efc6 100644 --- a/AppKit/CPCompatibility.j +++ b/AppKit/CPCompatibility.j @@ -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)