ten1seven / what-input

A global utility for tracking the current input method (mouse/pointer, keyboard or touch).
https://ten1seven.github.io/what-input
MIT License
1.35k stars 89 forks source link

Change initial value of shouldPersist to false to avoid setting storage before DOMContentLoaded #127

Closed FanFataL closed 2 years ago

FanFataL commented 2 years ago

When you make any interaction on the page before DOMContentLoaded event has been triggered the library set what-intent item in the sessionStorage even if the data-whatpersist is set to false.

Additionally I have fixed checking the false value from html tag.

ten1seven commented 2 years ago

@FanFataL apologies for my delay in checking this out! This looks good. Thank you for submitting a PR! I'm merging this in today and will publish an update to NPM.