Skip to content

Author: admin@master

console.log to stdout on gulp events

I want to log to stdout (the config environment) when a gulp task is running or has run. Something like this: I am not sure what event I should be responding to or where to find a list of these. Any pointers? Many thanks. Answer (In December 2017, the gulp-util module, which provided logging, was deprecated. …

How to feature-detect es6 modules

I’d like to export a module using the ES6 syntax only if it is supported in the current runtime. The goal is to develop a library that support different module management systems. As export is a keyword, something like will throw a syntax error : Answer Use ref

JS: Touch equivalent for mouseenter

is there a touch equivalent of the mouseenter. I would like to detect if user slide on my DIV. I prefer a solution depending directly on the target element not on a parent element with recounting positions etc. The site: http://dizzyn.github.io/piano-game/ – works fine with mouse (mouse down and slide; …

Should I use window.onload event

Perhaps this is a duplicate question, but I wanted to ask. I want to make a JS application that does not use third party libraries, for the purpose of learning JS events within a browser. So I structured my app like this: My html page looks something like this: Though I send window.document to my immediate fu…