Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/mq4-hover-shim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@rebertia.com>2015-01-10 00:07:30 +0300
committerChris Rebert <code@rebertia.com>2015-01-10 00:12:33 +0300
commit507566200dcd9221a1cb109878c9837e0376b4c8 (patch)
treee21a9be0aa6776cbc3d3d0a378c37a08910174dd /README.md
parent38d163dea44c4b7f8a880a245275cd70f305091e (diff)
update README to account for #4
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index a297b9e..1a1f863 100644
--- a/README.md
+++ b/README.md
@@ -107,10 +107,21 @@ The module exports one public function:
* Arguments: none
* Side-effects: none
* Return type: `boolean`
- * Returns a `boolean` value indicating if the browser's primary pointer supports true hovering or if the browser at least does not try to quirkily emulate hovering, such that [`:hover`](hover-pseudo) CSS styles are appropriate.
+ * Returns a `boolean` value indicating if the browser's primary pointer currently supports true hovering or if the browser at least does not try to quirkily emulate hovering, such that [`:hover`](hover-pseudo) CSS styles are appropriate.
* In other words, returns `true` if `@media (hover: hover)` would evaluate to `true` were the browser to natively correctly implement Media Queries Level 4; otherwise, returns `false`.
* If the browser does not natively support the `hover` media feature, but does support touch via some pointing input device, then we define this touch-based pointer to be the "primary pointer". Hence, if said browser has multiple pointing input devices, one supporting touch and another supporting true hovering (e.g. the computer has both a mouse and a touchscreen), this function will return `false`, since the user could use the touch input device at any time and since `:hover` should only be used for progressive enhancement anyway.
+The module has one public event:
+* Event name: `mq4hsChange`
+ * Fired whenever the primary pointer's support for true hovering changes.
+ * This may be due to a different pointer becoming the primary pointer, although that's not the only possible cause.
+ * This event isn't fired merely if a different pointer becomes the primary pointer. The new primary pointer must also differ from the old primary pointer in its support for true hovering. For example, switching from one mouse to another mouse, or from one touchscreen to another touchscreen won't cause this event to fire.
+ * Target: the `document` object
+ * Extra properties:
+ * `canTrulyHover`
+ * Type: `boolean`
+ * Value: Same as `supportsTrueHover()`'s return value at the time of firing the event
+
## Grunt
Use [grunt-postcss](https://github.com/nDmitry/grunt-postcss) to invoke the mq4-hover-hover-shim CSS postprocessor via [Grunt](http://gruntjs.com/) task.