MCPcopy Create free account
hub / github.com/deepch/RTSPtoWebRTC / _loop

Function _loop

web/static/js/bootstrap.bundle.js:5285–5301  ·  view source on GitHub ↗
(i, len)

Source from the content-addressed store, hash-verified

5283 var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
5284
5285 var _loop = function _loop(i, len) {
5286 var el = elements[i];
5287 var elName = el.nodeName.toLowerCase();
5288
5289 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
5290 el.parentNode.removeChild(el);
5291 return "continue";
5292 }
5293
5294 var attributeList = [].slice.call(el.attributes);
5295 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
5296 attributeList.forEach(function (attr) {
5297 if (!allowedAttribute(attr, whitelistedAttributes)) {
5298 el.removeAttribute(attr.nodeName);
5299 }
5300 });
5301 };
5302
5303 for (var i = 0, len = elements.length; i < len; i++) {
5304 var _ret = _loop(i, len);

Callers 1

sanitizeHtmlFunction · 0.70

Calls 1

allowedAttributeFunction · 0.70

Tested by

no test coverage detected