Modernizr: Q: what is the "heartz" property in the feature-detect Touchevents

Created on 21 Dec 2015  Â·  6Comments  Â·  Source: Modernizr/Modernizr

what is heartz for?

var query = ['@media (',prefixes.join('touch-enabled),('),'heartz',')','{#modernizr{top:9px;position:absolute}}'].join('');
testStyles(query, function( node ) {
  bool = node.offsetTop === 9;
});

Most helpful comment

This is what comments are for :-D

All 6 comments

I know it is just a random string, it used to be modernizr, but I honestly don't remember the reasoning for it. @paulirish you added it - do you remember?

Oh just random. A word you'll see when slex and I are talking.

It's long-hand for <3z
On Wed, Dec 23, 2015 at 5:31 PM Paul Irish notifications@github.com wrote:

Oh just random. A word you'll see when slex and I are talking.

—
Reply to this email directly or view it on GitHub
https://github.com/Modernizr/Modernizr/issues/1814#issuecomment-167008742
.

I meant why do we include a random word

On Dec 23, 2015, at 6:31 PM, Paul Irish [email protected] wrote:

Oh just random. A word you'll see when slex and I are talking.
—
Reply to this email directly or view it on GitHub.

Because we need something that'll be a non matching MQ to help terminate
the join()

It could probably be done another way but I didn't want to change the
prefixes array and such.

This is what comments are for :-D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laukstein picture laukstein  Â·  4Comments

BasJan81 picture BasJan81  Â·  9Comments

DervishD picture DervishD  Â·  8Comments

JonathanDoelan picture JonathanDoelan  Â·  3Comments

RehanSaeed picture RehanSaeed  Â·  6Comments