-function addOne(obj, type, fn, context) {
- var id = type + stamp(fn) + (context ? '_' + stamp(context) : '');
-
- if (obj[eventsKey] && obj[eventsKey][id]) { return this; }
-
- var handler = function (e) {
- return fn.call(context || obj, e || window.event);
- };
-
- var originalHandler = handler;
-
- if (pointer && type.indexOf('touch') === 0) {
- // Needs DomEvent.Pointer.js
- addPointerListener(obj, type, handler, id);
-
- } else if (touch && (type === 'dblclick') && addDoubleTapListener &&
- !(pointer && chrome)) {
- // Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener
- // See #5180
- addDoubleTapListener(obj, handler, id);
-
- } else if ('addEventListener' in obj) {
-
- if (type === 'mousewheel') {
- obj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false);
-
- } else if ((type === 'mouseenter') || (type === 'mouseleave')) {
- handler = function (e) {
- e = e || window.event;
- if (isExternalTarget(obj, e)) {
- originalHandler(e);
- }
- };
- obj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false);
-
- } else {
- if (type === 'click' && android) {
- handler = function (e) {
- filterClick(e, originalHandler);
- };
- }
- obj.addEventListener(type, handler, false);
- }
+// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement
+// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.
+function create$1(tagName, className, container) {
+ var el = document.createElement(tagName);
+ el.className = className || '';