在我的应用中,我想在点击按钮后清除webview历史记录。在webview中是否存在像clearhistory这样的反应原生方法?
类似的东西:
tell application "System Events" to set PP_Running to exists (processes where name is "Microsoft PowerPoint")
if not PP_Running then return -- Power point is not launched !
tell application "Microsoft PowerPoint" to set Old_list to name of every presentation -- get initial list of open presentations
repeat with I from 1 to 100 -- for test, but it should be repeat with no limit
try
tell application "Microsoft PowerPoint" to set New_list to name of every presentation
on error
display alert "PowerPoint no longer launched"
return -- quit the loop
end try
repeat with aDoc in New_list
if not (Old_list contains aDoc) then -- new document has been opened !!
set Old_list to New_list
log "Open new document = " & aDoc -- do what ever you need to do !!
end if
end repeat
delay 0.5
set I to I + 1
end repeat