From 641a75fbc5a15724440dce3fc41c92cb1ef23699 Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 28 Apr 2021 00:11:21 +0000 Subject: [CRON] sync translated content --- .../web/api/window/ondevicelight/index.html | 106 +++++++++++++++++++++ .../web/api/window/ondeviceproximity/index.html | 94 ++++++++++++++++++ .../web/api/window/onuserproximity/index.html | 46 +++++++++ 3 files changed, 246 insertions(+) create mode 100644 files/zh-cn/orphaned/web/api/window/ondevicelight/index.html create mode 100644 files/zh-cn/orphaned/web/api/window/ondeviceproximity/index.html create mode 100644 files/zh-cn/orphaned/web/api/window/onuserproximity/index.html (limited to 'files/zh-cn/orphaned/web/api') diff --git a/files/zh-cn/orphaned/web/api/window/ondevicelight/index.html b/files/zh-cn/orphaned/web/api/window/ondevicelight/index.html new file mode 100644 index 0000000000..d4e668dc85 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/window/ondevicelight/index.html @@ -0,0 +1,106 @@ +--- +title: Window.ondevicelight +slug: orphaned/Web/API/Window/ondevicelight +tags: + - 实验中 + - 属性 + - 引用 + - 接口 + - 环境光事件 +translation_of: Web/API/Window/ondevicelight +original_slug: Web/API/Window/ondevicelight +--- +
{{APIRef}}
+ +
声明一个事件监听用以接收{{event("devicelight")}}事件。事件在设备的光传感器检测到周围环境光的强度发生变化时触发。
+ +

语法

+ +
window.ondevicelight = funcRef
+ +

当{{event("devicelight")}}事件触发时,调用funcRef函数。这些事件皆为 {{domxref("DeviceLightEvent")}}事件类型。

+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('AmbientLight', '#event-handlers', 'Ambient Light Events')}}{{Spec2('AmbientLight')}}Initial definition
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("22.0")}}[1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoMobile("15.0")}}[1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] 事件{{event("devicelight")}} 的使用最先被实现应用在Android (15.0) 的移动端火狐浏览器和火狐操作系统(B2G)。从 Gecko 22.0 {{geckoRelease("22.0")}}开始,面向Mac OS X 的桌面应用也已实现。目前对Windows 7的支持还在进行中(详见 {{bug(754199)}})。

+ +

相关链接

+ + diff --git a/files/zh-cn/orphaned/web/api/window/ondeviceproximity/index.html b/files/zh-cn/orphaned/web/api/window/ondeviceproximity/index.html new file mode 100644 index 0000000000..5a7d414518 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/window/ondeviceproximity/index.html @@ -0,0 +1,94 @@ +--- +title: Window.ondeviceproximity +slug: orphaned/Web/API/Window/ondeviceproximity +translation_of: Web/API/Window/ondeviceproximity +original_slug: Web/API/Window/ondeviceproximity +--- +

{{ ApiRef() }}

+ +

指定一个事件监听器来接受 {{event("deviceproximity")}} 事件,当设备传感器检测到一个对象越来越接近或远离设备时这些事件就会出现。

+ +

语法

+ +
window.onuserproximity = funcRef
+ +

其中funcRef是在发生 {{event("deviceproximity")}} 事件时要调用的函数。这些事件的类型为{{domxref("DeviceProximityEvent")}}。

+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('Proximity Events', '#device-proximity', 'Proximity Events') }}{{ Spec2('Proximity Events') }}Initial specification
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatNo() }}{{ CompatVersionUnknown() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("15.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +

See also

+ + diff --git a/files/zh-cn/orphaned/web/api/window/onuserproximity/index.html b/files/zh-cn/orphaned/web/api/window/onuserproximity/index.html new file mode 100644 index 0000000000..254ceea752 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/window/onuserproximity/index.html @@ -0,0 +1,46 @@ +--- +title: Window.onuserproximity +slug: orphaned/Web/API/Window/onuserproximity +translation_of: Web/API/Window/onuserproximity +original_slug: Web/API/Window/onuserproximity +--- +

{{ ApiRef() }}

+ +

Window.onuserproxymity 属性代表一个 {{domxref("EventHandler")}}, 当触发 {{event("userproximity")}} 事件时会调用这个函数。这些事件是 {{domxref("UserProximityEvent")}} 类型的,在设备传感器检测到对象变得靠近时触发。

+ +

语法

+ +
window.onuserproximity = eventHandler
+ +

说明

+ + + + + + + + + + + + + + + + +
说明状态评论
{{ SpecName('Proximity Events', '#user-proximity', 'Proximity Events') }}{{ Spec2('Proximity Events') }}Initial specification
+ +

浏览器兼容

+ + + +

{{Compat("api.Window.onuserproximity")}}

+ +

其他

+ + -- cgit v1.2.3-54-g00ecf