diff --git a/README.md b/README.md index e70eaa4..d44dc1c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Proximity Sensors -This is a reference implementation of the W3C's Proximity Sensor related specifications, namely: - - * [Proximity Events](http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html) +This is a reference implementation of the W3C's [Proximity Events](http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html) specification. It can also be used as a polyfill. # Using for testing @@ -10,4 +8,15 @@ Just do this and you are good to go: * window.addEventListener('deviceproximity', function(e) { ... }) * window.addEventListener('userproximity', function(e) { ... }) + +Alternatively: + + * window.ondeviceproximity = function(e){ ... } + * window.onuserproximity = function(e){ ... } + + +Enjoy! + +# Using as polyfill or with Node.js +Depending on what you want to do, you can remove the "FakeSensor" and replace it with a real sensor (so long as you use the same method names).