diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 05b62fcd..4549ec6a 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -1,10 +1,11 @@ /** Get first element by selector * @param string +* @param [HTMLElement] defaults to document * @return HTMLElement */ -function qs(selector) { - return document.querySelector(selector); +function qs(selector, context) { + return (context || document).querySelector(selector); } /** Get last element by selector