ddrcode/FunctionSack — Issue #2: propertyIsEnumerable might not be available
Author: s-thet
Created: 2011-11-16 09:47:51+00:00
State: open

Hi!

I just tried to use functionsack to make Array.prototype.forEach, .indexOf and some more available on older mobile phones.

I did not use the complete functionsack, rather i used the tool to only pick the functions i need in my script.

link to my customized functionsack: http://functionsack.com/download.html?m=1&n=fns&f=04171A

I encountered an issue with propertyIsEnumerable, which is not available on for example the Nokia N96. Thus the feature detection will prevent the script from running.

var __features= { STRING_INDEX_ENUMERABLE: "abc".propertyIsEnumerable(1)

checking for propertyIsEnumerable before executing it helped me. i changed it to:

var __features= { STRING_INDEX_ENUMERABLE: "abc".propertyIsEnumerable && "abc".propertyIsEnumerable(1) || false;

rgds,
sebastian