Script's Resource
Purpose¶
Access to a script’s resources.
A script may have one or more resources of varying types: HTML, XML, XSLT, TypeScript, etc.
Methods¶
Binding name: resource
Method: String get(String resourceName)
Get the named resource as a String.
Method: String getCompiled(String resourceName)
Get the compiled form of the names resource as a String.
Warning
Currently only TypeScript compilation is supported. Therefore you can only get the compiled form of resources of type TypeScript.
Examples¶
println resource.getCompiled("MyTypeScript") println resource.get("MyTypeScript")