Open poi33 opened 5 years ago
Okay for setRootPermissions but create should stay this way
Create still uses the underscore parameters but all the other functions will not use them?
These underscores are not parameters but field names. And the reserved field names are starting with an underscore. You could in theory have both _name and name.
That makes sence, but i don't think this should be exposed to the javascript function calls. I don't want to remember that some functions use the underscore, and others don't. Can we have them standardized when exposed to javascript? Or is there a reason why we need to keep the java variable names when exposing them to JS ?
Only two of lib-bodes function have underscore parameters: Example: _name, _parentPath, _indexConfig.
Node.create() and Node.setRootPermissions() use these _params. (SetRootPermissions is missing from the lib-node docs)
Code https://github.com/enonic/xp/blob/32bbf4ff16883768c049429d7fac150cfdcdf060/modules/lib/lib-node/src/main/resources/lib/xp/node.js#L84-L91 and https://github.com/enonic/xp/blob/32bbf4ff16883768c049429d7fac150cfdcdf060/modules/lib/lib-node/src/main/resources/lib/xp/node.js#L396-L398
Can this be made consistent over all functions?