Project

Profile

Help

Feature #3569

closed

Test if a Javascript property exists before calling ixsl:get()

Added by Pieter Masereeuw almost 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Category:
IXSL extensions
Sprint/Milestone:
-
Start date:
2017-12-12
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Trunk
Fix Committed on JS Branch:
Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

It would be nice to be able to test if a property is present so that ixsl:get() does not issue a message in the console. I tried map:contains($obj, 'prop') but than the compiler complains that obj is not a map. So I wrote a small Javascript wrapper that performs the test:

    return object.hasOwnProperty(property);

Please register to edit this issue

Also available in: Atom PDF Tracking page