To get a custom property from a custom control, you can use the compositeData object. It automatically provides a handle to all custom properties passed to the custom control.
To get a custom property named myProperty in SSJS, you would use this statement:
var x = compositeData.myProperty;
Make sure it’s within an xp: tag