mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
16 lines
322 B
JavaScript
16 lines
322 B
JavaScript
|
/*
|
||
|
* $_
|
||
|
*
|
||
|
* Returns the element with the specified |name| attribute.
|
||
|
*/
|
||
|
function $_(name) {
|
||
|
var elements = document.getElementsByName(name);
|
||
|
|
||
|
if (!elements || elements.length < 1) { return null; }
|
||
|
if (elements.length > 2) {
|
||
|
logWarning("found multiple elements with name="+name);
|
||
|
}
|
||
|
|
||
|
return elements[0];
|
||
|
}
|