- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
iOS 10.x Simulator
上的 UIWebView
中加载网页,效果很好。 现在我正在尝试像这样在 WKWebView
中加载相同的网页 -
@interface ViewController2 ()
@property(strong,nonatomic) WKWebView *webView;
@property (strong, nonatomic) NSString *productURL;
@end
@implementation ViewController2
- (void)viewDidLoad
{
[super viewDidLoad];
self.productURL = @"http://192.168.1.157/rockwellApp_v2/?city=719";
NSURL *url = [NSURL URLWithString:self.productURL];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
_webView = [[WKWebView alloc] initWithFrame:self.view.frame];
[_webView loadRequest:request];
_webView.frame = CGRectMake(self.view.frame.origin.x,self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height);
[self.view addSubview:_webView];
}
@end
但未能加载完整网页。
当我在WebKit Nightly中调试WKWebView时,它在控制台中给我错误,如 SecurityError (DOM Exception 18): The operation is insecure.
最佳答案
使用无效或不安全的参数调用 window.history.pushState()
将触发异常:SecurityError (DOM Exception 18): The operation is insecure.
您加载的页面中的脚本很可能会尝试推送一些使用硬编码域或方案(例如 http://example.com
)的历史记录,这与您当前的不匹配域http://192.168.1.157
。
未捕获的异常将阻止脚本的其余部分进行评估。这就是它不能完全加载/呈现的原因。
要调试此问题,请在 Web 检查器中添加异常断点,然后按 cmd
+ r
刷新页面,并将 Web 调试器作为所选窗口。
关于javascript - 安全错误(DOM 异常 18): The operation is insecure WKWebkit iOS 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40463796/
这个网址:https://slowapi.com 我找不到不安全的内容,Chrome 一直在提示, 有任何想法吗? 最佳答案 当要求 HTTPS 页面通过 HTTP 加载资源时,会出现“混合内容”警告
我对 chrome 进行了扩展。当我浏览到 https 下的网站时,我的链接仍在 http 下,我收到:“该站点使用 SSL,但 Google Chrome 检测到页面上存在高风险不安全内容或站点证书
Insecure CAPTCHA(不安全的验证码) 加载验证码需要向Google申请验证码API。由于大陆地区访问不了Google,所以无法获取到验证码,所以需要耐心等待访问Google超时时间才能做
JSLint 报告以下行的不安全“^”。这是为什么?还是只要我想否定一个字符类,它就会提示? // remove all non alphanumeric, comma and dash charac
我正在尝试使我的Javascript代码100%JSLint干净。 我有一个正则表达式: linkRgx = /https?:\/\/[^\s;|\\*'"!,()<>]+/g; JSLint报告:
我有以下代码: using (FileStream fs = new FileStream(path_to_xml, FileMode.Open)) { using (XmlReader xr
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
runserver --insecure 时有没有办法提供媒体文件? 它只提供 css 和 js 以及图像,但我需要提供媒体文件...... They提到使用 cachefile 是不可能的,但没有关
这个问题已经有答案了: Open a new tab/window and write something to it? (3 个回答) 已关闭 9 年前。 我正在用 JavaScript 创建一个名
我有以下 html 元素 Edit 单击时,我想从 data-content 属性读取内容并填充相应的 html 元素。 这是我的尝试 $('.btn-modal').on('click', func
我必须使用输入类型文件(图片)更新数据,但是当用户没有更新图片时,会出现安全错误,我尝试用此 answer with 21 vote 来解决问题我在控制台中得到这个 There is an input
我有一个自定义的 FileArgument 类,我用它来存储有关上传文件的信息: export class FileArgument { name: string; path: string;
JSLint 报告以下行的不安全“^”。这是为什么?还是只要我想否定一个字符类,它就会提示? // remove all non alphanumeric, comma and dash charac
登录时使用自签名证书的私有(private)注册表说明: FATA[0005] Error response from daemon: v1 ping attempt failed with erro
在安装好Docker以后,想从公司搭建的私服Harbor上docker pull的时候碰上了x509问题,这个问题的原因是docker会验证网站的证书,私服没有相应的证书所以docker拒绝访问,但
Flutter 团队最近做了这个改变,现在不允许不安全的 http 连接。 https://flutter.dev/docs/release/breaking-changes/network-poli
当我以下一种方式将历史记录推送到浏览器时: window.history.pushState( { some_safe_data: data
当我尝试加载使用 cPickle 转储的内容时,我收到错误消息: ValueError: insecure string pickle 转储和加载工作都在同一台计算机上完成,因此使用相同的操作系统:U
我正在尝试向 jQuery Mobile 页面动态添加元数据 block 、链接和脚本。 脚本包含一个规则,我正在通过 javascript 添加到 CSS 样式表(不幸的是必须是这样)。 看起来像这
我在我的项目中使用了 html2canvas.js 将我的元素(主体)转换为 Canvas ,然后将 Canvas 转换为图像。我的元素包含从跨域加载的图像。从元素创建的 Canvas 工作正常,但是
我是一名优秀的程序员,十分优秀!