I'm trying to make a script, saved as an application bundle, that handle custom URL schemes.
I know how to handle it in Applescript:
on open location theURLtext
do things here
end open location
But I don't know how to do it with javascript, there's not much documentation about JS for automation yet.
Thank you and excuse my bad english.
The equivalent to the open location handler is to define a function with a specific name.
The release notes for JavaScript for Automation do not specifically mention this handler, but this is what it should be called based on the naming convention for translating AppleScript to JSA.