use-ownerGlobal

要求使用 .ownerGlobal 而不是 .ownerDocument.defaultView

此规则不正确的代码示例:

aEvent.target.ownerDocument.defaultView;
this.DOMPointNode.ownerDocument.defaultView.getSelection();

此规则正确的代码示例:

aEvent.target.ownerGlobal;
this.DOMPointNode.ownerGlobal.getSelection();