How to detect whether browser supports Drag and Drop, Touch and BoxShadow?

Currently we are using Modernizr to detect whether browser supports Drag and Drop (DnD), Touch and BoxShadow or not. But now our company has decided to get rid of Modernizr so we have to perform checks for above mentioned features.

Regarding Touch and BoxShadow I couldn’t find anything. But for DnD, I found lots of information like similar implementation that we have in Modernizer, checking "draggable" in div, see below references:

How to check for IE Drag & Drop support of any element

https://gist.github.com/patrickkettner/762017e6f66d8c49027f

Detecting HTML5 Drag And Drop support in javascript

But the problem is all these questions and available information are 8-10 years old, also many people mentioned these methods are not fully reliable. So, is there any way to detect whether browser supports DnD, Touch and BoxShadow features without using any 3rd party components?

26 thoughts on “How to detect whether browser supports Drag and Drop, Touch and BoxShadow?”

Leave a Comment