Skip to content

propertyIsEnumerable might not be available #2

@s-thet

Description

@s-thet

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,
s-thet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions