方法未捕获SecurityError:阻止了具有原点的帧
Method Uncaught SecurityError: Blocked a frame with origin
该方法似乎有问题。当安装了"不安全"时,方法中的代码运行良好。谢谢
Uncaught SecurityError: Blocked a frame with origin "http://localhost:3000" from accessing a frame with origin "chrome-extension://oknpjjbmpnndlpmnhmekjpocelpnlfdi". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "chrome-extension". Protocols must match.
模板事件
Template.docEdit.events({
'click .remove': function(event, template) {
var thisTag = String(this);
Meteor.call('removeTag', template, thisTag);
},
});
方法
Meteor.methods({
removeTag: function(template, thisTag) {
MyPix.update (
template.data._id,
{ $pull: { 'metadata.tags': thisTag }}
);
}
})
添加了"不安全"的后,这确实起到了作用
Template.docEdit.events({
'click .remove': function(event, template) {
var thisTag = String(this);
MyPix.update (
template.data._id,
{ $pull: { 'metadata.tags': thisTag }}
);
}
});
好的,我正在传递整个模板。该方法只需要id。
模板事件
Template.docEdit.events({
'click .remove': function(event, template) {
var thisTag = String(this);
var thisId = template.data._id; // assign id to var
Meteor.call('removeTag', thisId, thisTag);
},
});
方法
Meteor.methods({
removeTag: function(thisId, thisTag) {
MyPix.update (
thisId,
{ $pull: { 'metadata.tags': thisTag }}
);
},
})
相关文章:
- CORS:访问控制允许原点不等于提供的原点
- CORS保持在SecurityError上:操作不安全
- 本地跨原点数据错误
- d3用时钟中的两个指针变换原点
- Cordova白名单允许导航与访问原点
- 谷歌地图API-从方向的原点检索定位
- 在画布上使用toDataUrl会导致IE中出现SecurityError
- 跨原点-弹出窗口(window.opener为空)
- SecurityError:操作在canvas.toDataURL中不安全
- 全局变量原点
- 如何在 html Web 应用中检测滑动原点位置
- 在自定义 JS 游标上设置游标原点
- 三.js - 如何获取相机相对于原点的位置
- 即使在服务器将访问控制允许原点设置为“*”之后,也会收到javascript错误
- OpenLayers圆始终显示在原点
- JSONP跨原点错误'不存在Access Control Allow Origin标头'
- 如何在交叉原点的角度中设置xsrf令牌
- 方法未捕获SecurityError:阻止了具有原点的帧
- 如何避免Uncaught SecurityError:用phonegap阻止了一个具有原点的帧
- 未捕获的SecurityError:阻止了一个具有原点的帧“;空”;从访问具有原点的帧“开始”;空”;.协议、域和端口必