我如何覆盖 jquery 中的事件变量
How can i override the event variable in jquery
默认情况下,在任何地方点击文档时,它都是错误的
我想将其更改为 true 我该怎么做..?
jQuery(document).click(function(e) {
console.log(e); //e.target.isConnected = false;
e.target.isConnected = true; //i want to overwrite
--logic--
--logic--
});
我收到这个错误:
Uncaught TypeError: Cannot assign to read only property 'isConnected'
of object '[object HTMLAnchorElement]'
我的申请在 angular 4
isConnected
属性 保存状态信息,因此它是只读的,不能使用赋值更改。
The isConnected
read-only property of the Node interface returns a boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM.
默认情况下,在任何地方点击文档时,它都是错误的 我想将其更改为 true 我该怎么做..?
jQuery(document).click(function(e) {
console.log(e); //e.target.isConnected = false;
e.target.isConnected = true; //i want to overwrite
--logic--
--logic--
});
我收到这个错误:
Uncaught TypeError: Cannot assign to read only property 'isConnected' of object '[object HTMLAnchorElement]'
我的申请在 angular 4
isConnected
属性 保存状态信息,因此它是只读的,不能使用赋值更改。
The
isConnected
read-only property of the Node interface returns a boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM.