Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Should we name the CrossPageChannel protocol CrossDomainChannel? Google thinks that is a better name but couldn't use it because it was already used. We are free use what is best for the protocol.
  • The namespace clojure.browser.repl2 contains an implementation for both ends of the CrossPageChannel. Some of the code will be run by the parent page and some by the child iframe.

Multiple Evaluators

There are circumstances where having an implementation of IJavaScriptEval which evaluates code in multiple environments at the same time would be useful. One use case would be to run a browser-connected REPL which is connected to multiple browsers at the same time. This would be extremely helpful when working on code that is tricky to get right in multiple browsers. Another use case would be to allow for automated tests to be run in multiple environments at the same time. This implementation of IJavaScriptEval would be configured with any number of other IJavaScriptEvals. When a new JavaScript form is received for evaluation, this evaluator would send it to all of its child evaluators and wait to get a response form all of them. Once all of the responses are received, they will be compared and if all of them are the same, that single result will be returned. If any of the results are different, then the returned map will indicate that an exception has been thrown and additional keys will added to provide the results from each environment.

...

  • Add a new protocol for IEvaluator which is used by a console to evaluate forms and return a map containing user feedback to be printed.
  • Extract console code from the current REPL and make it use the IEvaluator protocol.
  • Add a timeout in the REPL. This should only exist in the browser-connected REPL.
  • Add a new REPL documentation page to the wiki. Explain what we have so far, how it works and the issues we are dealing with. Share this with the ClojureScript team and get feedback before merging these changes into the master branch.
    • Show how to use it from scratch.
    • Show how to use it with an existing application like twitterbuzz.
  • Figure out how to implement *1, *2 etc in a way that is useful when evaluating in a browser.
  • The REPL client code for the "inner page" of the CrossPageChannel doesn't work when compiled in advanced mode. Find out why. It is currently being compiled with simple optimizations.
    • The most likely cause is that service names are registered as strings which refer to functions which get minified.