diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2023-06-13 01:43:37 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2023-06-13 01:43:37 +0200 |
commit | 03322672782a6318b019eff33fe44ec800d6f12c (patch) | |
tree | 9d807e1585cf28a1ea98e87b855932dba00f1880 /src/modules/core/selector.js | |
parent | 8e18b4698edd00f83af0be05bb3374f92fecaeb9 (diff) | |
download | svg.js-03322672782a6318b019eff33fe44ec800d6f12c.tar.gz svg.js-03322672782a6318b019eff33fe44ec800d6f12c.zip |
dependency updates, easier formatting
Diffstat (limited to 'src/modules/core/selector.js')
-rw-r--r-- | src/modules/core/selector.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/modules/core/selector.js b/src/modules/core/selector.js index 1667d4d..7dec4e4 100644 --- a/src/modules/core/selector.js +++ b/src/modules/core/selector.js @@ -3,17 +3,19 @@ import { globals } from '../../utils/window.js' import { map } from '../../utils/utils.js' import List from '../../types/List.js' -export default function baseFind (query, parent) { - return new List(map((parent || globals.document).querySelectorAll(query), function (node) { - return adopt(node) - })) +export default function baseFind(query, parent) { + return new List( + map((parent || globals.document).querySelectorAll(query), function (node) { + return adopt(node) + }) + ) } // Scoped find method -export function find (query) { +export function find(query) { return baseFind(query, this.node) } -export function findOne (query) { +export function findOne(query) { return adopt(this.node.querySelector(query)) } |