1. Setting to Enable AppleScript
A setting must be enabled to use. Here is how to read and write it:
/usr/bin/defaults write com.apple.Safari AllowJavaScriptFromAppleEvents -bool true
/usr/bin/defaults read com.apple.Safari AllowJavaScriptFromAppleEvents
Unfortunately, the following returns an empty string:
LibC resultOfCommand: '/usr/bin/defaults read com.apple.Safari AllowJavaScriptFromAppleEvents
So not sure if we can check this from inside the image. Maybe documentation is the best we can do here?
2. Delegate to Applescript Project
CwSafari>>#doJavascript: uses Applescript underneath, but CwSafari>>#applescriptTell: is using something handrolled
1. Setting to Enable AppleScript
A setting must be enabled to use. Here is how to read and write it:
Unfortunately, the following returns an empty string:
So not sure if we can check this from inside the image. Maybe documentation is the best we can do here?
2. Delegate to Applescript Project
CwSafari>>#doJavascript:usesApplescriptunderneath, butCwSafari>>#applescriptTell:is using something handrolled