AppleScript - JavaScript execution on Firefox

£可爱£侵袭症+ 提交于 2019-12-07 19:58:31

问题


Safari and Chrome can execute JavaScript via AppleScript

Safari:

 tell application "Safari"
    open location "http://example.com"
    activate
    do JavaScript "alert('example');" in current tab of first window
end tell

Chrome:

tell application "Google Chrome"
    open location "http://example.com"
    activate
    execute front window's active tab javascript "alert('example');"
end tell

Is there a way to do this in Firefox?

Note: Same question for Opera is here: AppleScript - JavaScript execution on Opera

I thought about asking them together, but I decided to ask two separate questions to be able to accept answers separately.


回答1:


Running javascript using AppleScript in Firefox has not been implemented. Bug Story.
It is in New state and with no assignees. You could take that up :)



来源:https://stackoverflow.com/questions/14383039/applescript-javascript-execution-on-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!