andruhon commented on a change in pull request #382: WICKET-6688 add RFC and 
replace eval with DOM eval
URL: https://github.com/apache/wicket/pull/382#discussion_r327927507
 
 

 ##########
 File path: 
wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
 ##########
 @@ -956,7 +975,7 @@
 
                                        try {
                                                // do the evaluation in global 
scope
-                                               var f = window.eval(toExecute);
+                                               var f = 
jQuery.globalEval(toExecute, {nonce: nonce});
 
 Review comment:
   Hi @martin-g ! All right, I'm back with my dodgy experiments. I implemented 
the workaround to feed notify callback and parameters into global eval.
   
   The change in wicket-ajax-jquery:
   
https://github.com/andruhon/wicket-delayed-animation/commit/f2aefa73902d89b9cfdae5f55fc2690c1b3282ac#diff-459f1fe1d12bc75eca45c5998e5dd29e
   
   The branch in my quickstart project
   
https://github.com/andruhon/wicket-delayed-animation/tree/manual-notify-globalEval-closure
   
   P.S.
   Maybe I'm not very successful on expressing my thoughts. I do actually like 
the notify functionality itself, that's why I don't want to promote my 
non-streamline workarounds with timeouts. What I don't like is that it has to 
be added as a string `notify|` and then parsed. Why don't we add some kind of 
`notify="true"` attribute to the eval tag in response? What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to