MCPcopy Create free account
hub / github.com/apache/impala / _loop

Function _loop

www/bootstrap/js/bootstrap.js:2707–2723  ·  view source on GitHub ↗
(i, len)

Source from the content-addressed store, hash-verified

2705 var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
2706
2707 var _loop = function _loop(i, len) {
2708 var el = elements[i];
2709 var elName = el.nodeName.toLowerCase();
2710
2711 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
2712 el.parentNode.removeChild(el);
2713 return "continue";
2714 }
2715
2716 var attributeList = [].slice.call(el.attributes);
2717 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
2718 attributeList.forEach(function (attr) {
2719 if (!allowedAttribute(attr, whitelistedAttributes)) {
2720 el.removeAttribute(attr.nodeName);
2721 }
2722 });
2723 };
2724
2725 for (var i = 0, len = elements.length; i < len; i++) {
2726 var _ret = _loop(i, len);

Callers 1

sanitizeHtmlFunction · 0.85

Calls 4

allowedAttributeFunction · 0.85
removeChildMethod · 0.80
concatMethod · 0.80
callMethod · 0.65

Tested by

no test coverage detected