JavaScript in File Type context menu?

Is JavaScript supported in File Type context menus or is "Script Function" limited to traditional command scripting? If JavaScript is supported, a simple example would be appreciated.

It is, you just need to add @script jscript as the first line.