69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/osascript/Safari.rb', line 69
def document_text
options ||= {}
where = options[:where] || 'front document'
code = <<~CODE
if count of window is 0
return null
else
return text of (#{where})
end
CODE
Osascript::__asrun(code, 'Safari')
end
|