mirror of
https://github.com/NohamR/safari-internal-js.git
synced 2026-10-11 02:49:41 +00:00
Add 27.0 js src
This commit is contained in:
13
27.0/js/automation/WDElementDisplayed.js
Normal file
13
27.0/js/automation/WDElementDisplayed.js
Normal file
@@ -0,0 +1,13 @@
|
||||
//# 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 };
|
||||
}
|
||||
Reference in New Issue
Block a user