DragSupportDetector class
Detector for browser support of drag events.
class DragSupportDetector {
bool _isSupported;
/**
* Using a run-time check, return true if drag events are supported.
*
* @return true if supported, false otherwise.
*/
bool get isSupported => _isSupported;
DragSupportDetector() {
_isSupported = detectDragSupport();
}
bool detectDragSupport() {
dart_html.DivElement elem = new dart_html.DivElement();
try {
elem.onDragStart.listen((dart_html.Event evt){
return;
});
} on Exception catch(e) {
return false;
}
return true;//(typeof elem.ondragstart) == "function";
}
}
Subclasses
Constructors
Properties
final bool isSupported #
Using a run-time check, return true if drag events are supported.
@return true if supported, false otherwise.
bool get isSupported => _isSupported;
Methods
bool detectDragSupport() #
bool detectDragSupport() {
dart_html.DivElement elem = new dart_html.DivElement();
try {
elem.onDragStart.listen((dart_html.Event evt){
return;
});
} on Exception catch(e) {
return false;
}
return true;//(typeof elem.ondragstart) == "function";
}