This project is read-only.

New major version with doNotProcessCSS = true by default


I think that process css by default is a bad idea.
I can say more, in my opinion, css processing feature should be moved from hand.js to the separate script.
The main aim of hand.js is to provide polyfill for pointer events. It's better to use small modules with particular functionality, not one combine.
But even if you think that all the stuff should be in the hand.js, it's better to set doNotProcessCSS = true by default, because nobody should use it in production to avoid additional http requests for css files.
Do you agree?)


apsavin wrote Sep 18, 2014 at 11:26 AM


SaschaNaz wrote Sep 18, 2014 at 7:21 PM

Sorry for my late response.

I think HandJS should have both feature because a single Pointer Events specification contains both. However, I think it's good idea to have separate scripts with combined one together, so for example, hand.event.js, hand.css.js, and integrated hand.js.

I have considered better css polyfill method, as I really don't want to request and search all those CSS codes when I just want a few element to have touch-action property. I have no truly better method yet, but we may use additional data-handjs property to reduce requests and calculations.
<style src="..." />
<style src="..." />
<style src="..." data-handjs /> <!-- this one will be parsed, others not -->
I would be happier if there is an external module that is solely for general CSS polyfill. [Grid Layout polyfill] also have long codes for CSS polyfill, so a module for this will be good!

apsavin wrote Sep 19, 2014 at 5:08 AM

Yeah, variant with data-handjs is good enough.
But it's much more easier to just set doNotProcessCSS = true by default, isn't it? As I said, nobody should use feature of parsing of css in production.

SaschaNaz wrote Sep 19, 2014 at 7:21 AM

Well... I would rather split the script and deprecate doNotProcessCSS. People who does not want CSS feature will get smaller script then. ;)

apsavin wrote Sep 19, 2014 at 8:05 AM


EgorKluch wrote Nov 28, 2014 at 12:35 PM

SaschaNaz, hi, what's news about doNotProcessCSS and soliting scripts?