@@ -9,6 +9,9 @@
-define(B(E), nitro:to_binary(E)).
-define(L(E), nitro:to_list(E)).
+target({ps,Id,Ps}) ->
+ T = target(Id), P = nitro:js_escape(Ps),
+ ["var ts=",T,",ps = '",P,"'.split('.').reduce((a,p)=>(a&&a[p]?a[p]:null),ts);","ps&&ps"];
target({qs,S}) -> ["qs('",nitro:js_escape(?L(S)), "')"];
target(Id) -> ["qi('",nitro:js_escape(?L(Id)),"')"].