Get dataset from DOM element.
Contains code copied from
https://github.com/remy/polyfills/blob/master/dataset.js.
@param {HTMLElement} element - The element to check for dataset support.
@returns {Object} The data set.
779009
function dataSet( element ) {
  if ( document.documentElement.dataset ) {
    return _assign( {}, element.dataset );
  }
  const dataset = {};
  const regex = /^data-(.+)/;
  let attr;
  let match;

  for ( var i = 0; i < element.attributes.length; i++ ) {
    attr = element.attributes[i];
    match = attr.name.match( regex );
    if ( match ) {
      dataset[_toCamelCase( match[1] )] = attr.value;
    }
  }

  return dataset;
}
1064470
function getDivContainer( element ) {
			var container = editor.elementPath( element ).blockLimit;

			// Never consider read-only (i.e. contenteditable=false) element as
			// a first div limit (#11083).
			if ( container.isReadOnly() )
				container = container.getParent();

			// Dont stop at 'td' and 'th' when div should wrap entire table.
			if ( editor.config.div_wrapTable && container.is( [ 'td', 'th' ] ) ) {
				var parentPath = editor.elementPath( container.getParent() );
				container = parentPath.blockLimit;
			}

			return container;
		}
56748
def read(self):
        
        def ds(data_element):
            value = self._str_filter.ToStringPair(data_element.GetTag())
            if value[1]:
                return DataElement(data_element, value[0].strip(), value[1].strip())

        results = [data for data in self.walk(ds) if data is not None]
        return results
131869
function ( html ) {
            var el = this.element();
    
            //setter
            if ( html || html == 0 ) {
                el.innerHTML = String(html);
                //getter
            } else {
                return el.innerHTML;
            }
        }
779903
function(element) {
			var moduleName = getModuleName(element),
				moduleData = modules[moduleName],
				instanceData,
				context,
				module;

			if (!moduleData) {
				error(new Error('Module type "' + moduleName + '" is not defined.'));
				return;
			}

			if (!this.isStarted(element)) {
				// Auto-assign module id to element
				if (!element.id) {
					element.id = 'mod-' + moduleName + '-' + moduleData.counter;
				}

				moduleData.counter++;

				context = new Box.Context(this, element);

				module = moduleData.creator(context);

				// Prevent errors from showing the browser, fire event instead
				if (!globalConfig.debug) {
					captureObjectErrors(module, moduleName);
				}

				instanceData = {
					moduleName: moduleName,
					instance: module,
					context: context,
					element: element,
					eventHandlers: {}
				};

				bindEventListeners(instanceData);

				instances[element.id] = instanceData;

				callModuleMethod(instanceData.instance, 'init');

				var moduleBehaviors = getBehaviors(instanceData),
					behaviorInstance;

				for (var i = 0, len = moduleBehaviors.length; i < len; i++) {
					behaviorInstance = moduleBehaviors[i];
					callModuleMethod(behaviorInstance, 'init');
				}

			}
		}
209496
function (element) {
            // Begin with checking the validate
            var elementAsArray = [ element ],
                validationType = element.getAttribute("data-validate") || null;
                invalidElement = [];
            if (validationType !== null) {
                validationType = this.splitStringByComma(validationType);
                for (var i = 0; i < validationType.length; i++) {
                    invalidElement = this.getElementsByPattern(elementAsArray, this.patterns[validationType[i]], validationType[i]);
                    if (invalidElement.length > 0) {
                        this.currentValidationType = validationType[i];
                        return false;
                    }
                }
            }
            // As data-validate="length" has already been checked,
            // only check the elements with data-length set.
            if (element.getAttribute("data-length") === null ||
                validationType !== null && validationType.indexOf("length") !== -1)
                return true;
            validationType = "length";
            invalidElement = this.getElementsByPattern(elementAsArray, this.patterns[validationType], validationType);
            if (invalidElement.length > 0)
                return false;

            return true;
        }
607092
function getCompsByElement(element) {
    var elements = element ? element : this.elements;
    var returnComps = [];
    if (typeof elements == 'string') {
        elements = document.querySelectorAll(elements);
    }
    if (!isArray(elements) && !(elements instanceof NodeList)) elements = [elements];
    each(elements, function (i, element) {
        if (element) {
            element.querySelectorAll('[u-meta]').forEach(function (ele) {
                if (ele['u-meta']) {
                    var comp = ele['u-meta'];
                    if (comp) returnComps.push(comp);
                }
            });
        }
    });
    return returnComps;
}
893086
function(element) {
    if (!element.bindings) {
      element.bindings = compile(this, element);
      View.makeInstanceOf(element);
    }

    return element;
  }
303930
function getClickDataset(path) {
            var el;
            for (var i = 0; i < path.length; i++) {
                el = path[i];
                if (el.dataset.nctr !== undefined) {
                    return el.dataset;
                }
            }
            return null;
        }
998538
static String getMetaData(Element element) {
		String label = element.getAttributeNS(INKSCAPE, "label");
		if ((label != null) && (!label.equals(""))) {
			return label;
		}
		
		return element.getAttribute("id");
	}
461985
function get(element) {
  var name = element.nodeName.toLowerCase()
    , value;

  if (get.parser[element.type] && hasOwn.call(get.parser, element.type)) {
    value = get.parser[element.type](element);
  } else if (get.parser[name] && hasOwn.call(get.parser, name)) {
    value = get.parser[name](element);
  }

  if (value !== undefined) return value;

  value = element.value;

  return 'string' === typeof value
  ? value.replace(/\r/g, '')
  : value === null ? '' : value;
}
165078
def dataSetElementType(h5Dataset):
    
    dtype =  h5Dataset.dtype

    if dtype.names:
        return '<structured>'
    else:
        if dtype.metadata and 'vlen' in dtype.metadata:
            vlen_type = dtype.metadata['vlen']
            try:
                return "<vlen {}>".format(vlen_type.__name__)  # when vlen_type is a type
            except AttributeError: #
                return "<vlen {}>".format(vlen_type.name)      # when vlen_type is a dtype

    return str(dtype)
1238447
function getClosestTodoElement(element) {

		var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.msMatchesSelector;

		while (element) {
			if (matchesSelector.bind(element)('li')) {
				return element;
			} else {
				element = element.parentNode;
			}
		}
		return false;

	}
548034
function(element) {
    element = $(element);
    var node = element.firstChild;
    while (node) {
      var nextNode = node.nextSibling;
      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
        element.removeChild(node);
      node = nextNode;
    }
    return element;
  }
781801
function get (element, content) {
    element = document.createElement(element);
    if (element && content) {
      element.innerHTML = content;
    }
    return element;
  }
508902
def getElement(self, node, name, nsuri=None, default=join):
        """"""
        nsmatch = self.nsUriMatch
        ELEMENT_NODE = node.ELEMENT_NODE
        for child in node.childNodes:
            if child.nodeType == ELEMENT_NODE:
                if ((child.localName == name or name is None) and
                    (nsuri is None or nsmatch(child.namespaceURI, nsuri))
                    ):
                    return child
        if default is not join:
            return default
        raise KeyError, name
857896
function(element, options) {
        this.name = name;
        this.$ = $(element);
        this.isTable = (this.$[0].tagName === 'TABLE');
        this.firstShow = true;
        if(this.isTable) {
            this.$table = this.$;
            this.id = 'datatable-' + (this.$.attr('id') || $.zui.uuid());
        } else {
            this.$datatable = this.$.addClass('datatable');
            if(this.$.attr('id')) {
                this.id = this.$.attr('id');
            } else {
                this.id = 'datatable-' + $.zui.uuid();
                this.$.attr('id', this.id);
            }
        }
        this.getOptions(options);
        this.load();

        this.callEvent('ready');
    }