Files
safari-internal-js/27.0/js/automation/WDElementDisplayed.js
2026-09-17 13:47:07 +02:00

14 lines
459 B
JavaScript

//# sourceURL=__InjectedScript_WDElementDisplayed.js
function fetchTagNameAndAttributesOfElement(element) {
"use strict";
let tagName = element.tagName.toUpperCase();
let attributes = {};
for (let i = 0; i < element.attributes.length; ++i) {
let name = element.attributes[i].name.toLowerCase();
let value = element.attributes[i].value;
if (!value.length) value = null;
attributes[name] = value;
}
return { tagName, attributes };
}