Я не могу получить значения из внутренних функций текущей веб-страницы в Chrome. Почему это произошло?
для примеров в JXA:
function getTime() {
const chrome = Application('Google Chrome')
const currentTab = chrome.windows[0].activeTab()
return currentTab.execute({javascript: 'jwplayer().getPosition()'})
}
getTime()
Chrome возвращает справочную ошибку:
Uncaught ReferenceError: jwplayer is not defined
в AppleScript то же самое:
tell application "Google Chrome"
return execute front window's active tab javascript "jwplayer().getPosition()"
end tell
Настройки в Chrome проверены: «Разрешить Javascript из событий Apple».