用户界面项目视图

翻译不完整。 请帮助我们翻译这篇文章!

The UIEvent.view 只读属性返回的生成事件的 document.defaultView (window of the document) 对象。在浏览器中,这是事件所在的 Window 对象。

语法

var view = event.view;
  • view 是对 AbstractView 对象的引用。

技术参数

规格 状态 注释
Document Object Model (DOM) Level 3 Events Specification
UIEvent
Obsolete Document Object Model (DOM) Level 2 Events Specification, 将 view 类型从 AbstractView 更改为 WindowProxy.
Document Object Model (DOM) Level 2 Events Specification
UIEvent
Obsolete 最初的定义。

浏览器的兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
viewChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support