Uploaded image for project: 'ClojureScript'
  1. CLJS-392

Documentation says CLJS can open connections to the REPL server from a "file://" source, and you can't

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: None
    • Environment:

      ClojureScript 0.0-1450

      Description

      At https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments there is the following paragraph:

      "This is a problem for the browser-connected REPL because FireFox and Chrome both view opening a file from the file system and connecting to localhost:9000 as different domains.
      (...)
      Fortunately, Google has also run into this problem and has created something called a CrossPageChannel. Without going into the details, this allows an iframe served from one domain (the REPL) to communicate with the parent page which was served from another domain (the application server)."

      From what I tested, you CANT connect to the REPL server at "http://localhost:9000/repl" if you initially loaded the page using the "file://" protocol. But you can if you loaded it from the same hostname on another port using "http://". The documentation is wrong, and also it needs to be clarified on what you really can change from the initial domain, like the port, without broking the REPL connection (or link to a CrossPageChannel documentation page with the details on what same-origin policy checks it can overcome).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nahuel nahuel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: