google-chrome - 获取控制台错误'Uncaught TypeError:无法读取此行的属性'run' of undefined':google.script.run
问题描述
这发生在 Chrome 上,但不在我的 Iphone 7 上,也不在 Firefox 上。它在 V8 和 Rhino 中都失败了
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
$(function(){
google.script.run//this is the line
.withSuccessHandler(function(vA) {
$('#sel1').css('background-color','#ffffff');
updateSelect(vA);
})
.getSelectOptions();
google.script.run
.withSuccessHandler(function(hl) {
document.getElementById('dt1').innerHTML=hl;
})
.getTimeStamp();
});
这是我清除的:
为什么清除我的浏览器数据可以解决这个问题?
我在控制台中注意到了这个警告。我想知道这是否与它有关。
与http://google.com/上的跨站点资源关联的 cookie设置为没有该
SameSite
属性。SameSite=None
它已被阻止,因为 Chrome 现在仅在使用和设置时才提供带有跨站点请求的 cookieSecure
。您可以在应用程序>存储>Cookies 下的开发人员工具中查看 cookie,并在https://www.chromestatus.com/feature/5088147346030592和https://www.chromestatus.com/feature/5633521622188032中查看更多详细信息。
解决方案
推荐阅读
- python - Python + Selenium + ChromeDriver:尝试单击类名时出现 ElementNotInteractableException
- python-3.x - 想要使用 python pandas 计算数据集的通过实例数
- sql - 有没有办法逐月显示记录?
- javascript - 如何在按钮单击时运行节点特定功能
- c++ - 如何卸载/销毁 lua 脚本?
- ionic-framework - admob 没有在我的应用程序中使用 ionic 5 显示广告
- javascript - 在 Typescript 中使用 NodeS7 包
- c++ - 花哨的技巧可以在本地破坏反射,但不能在在线编译器中破坏
- jquery - JQuery默认情况延迟淡出,当mouseenter保持可见时,mouseout淡出后
- reactjs - 为什么我的状态没有使用反应钩子更新并使用效果