How do I get a Part in the sirius-web scripting interface?

61 Views Asked by At

When using the system scripting interface ("system/scripting") of sirius-web (part of the sirius framework), what method is available to use to get a specific registered Part to use in my script?

2

There are 2 best solutions below

0
On

One could extend the DefaultGlobalContextExtender and place an instance of Injector in the context...

1
On

Create an object implementing sirius.web.templates.GlobalContextExtender and add the object by extending the collectScripting Method:

globalParameterCollector.accept("objectNameToAccess", objectToAdd);

Can be accessed from within the scripting by calling:

@objectNameToAccess.methodName()