Accessing behavior properties from javascript without using private methods

I can get and set behavior properties using behavior._getProperty() and behavior._setProperty(). However those are private methods and I was trying to figure if there was a way to do this using public methods. I’m trying to submit an extension for review and I recall a note that said that private methods starting with “_” should not be used.

Thank you!

Those are the one exception: as long as you only use those methods on a behavior coming from your own extension, those are allowed. They are marked with a _ so that other extensions do not attempt to call them and mess with your behavior’s internals using JavaScript.

1 Like