mirror of
https://github.com/NohamR/safari-internal-js.git
synced 2026-11-25 23:08:08 +00:00
Add Safari 27.2 JavaScript dump
This commit is contained in:
1 parent
897293bc5f
commit
f752a0a82c
40 files changed
+24914
-1
No files matched your search
@@ -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