diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index fb505f9..a0a0b7a 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -184,8 +184,10 @@ function Library (ronin) { // - this.of = (h, k) => { - return h[k] + this.of = (h, ...keys) => { + return keys.reduce((acc, key) => { + return acc[key] + }, h) } this.theme = (variable, el = document.documentElement) => { diff --git a/examples/benchmark.lisp b/examples/benchmark.lisp index cfe1d21..ab6fa3d 100644 --- a/examples/benchmark.lisp +++ b/examples/benchmark.lisp @@ -57,4 +57,5 @@ ; Interop (test "interop" ((of (of js "Math") "max") 2 4) 4) + (test "recursive key selector" ((of js "Math" "max") 2 4) 4) ) \ No newline at end of file