Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create browser-only .js file evaluating application/wisp scripts. #51

Merged
merged 1 commit into from
Jun 9, 2013
Merged

Create browser-only .js file evaluating application/wisp scripts. #51

merged 1 commit into from
Jun 9, 2013

Conversation

Janiczek
Copy link
Contributor

@Janiczek Janiczek commented Jun 5, 2013

I did the changes you suggested in #50, and found that I have to add read* to functions required by src/engine/browser.wisp to make it work.

This allows me to do something like this:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Wisp</title>
    <script src="scripts/wisp.js"></script>
    <script type="application/wisp">
      (print "Wisp code run on the client in a script tag!")
    </script>
    <script type="application/wisp" src="scripts/test.wisp"></script>
  </head>
  <body>
  </body>
</html>

scripts/wisp.js being the browser-embed.js created by this new Makefile, and

scripts/test.wisp being file with contents:

(print "Wisp code run on the client from a file!")

this does

Wisp code run on the client in a script tag!
Wisp code run on the client from a file!

in my console.

@Janiczek
Copy link
Contributor Author

Janiczek commented Jun 5, 2013

(Maybe the embeddable file is worth mentioning in the docs? I know I searched for it the first time and was very puzzled ... :) )

Gozala added a commit that referenced this pull request Jun 9, 2013
Create browser-only .js file evaluating application/wisp scripts.
@Gozala Gozala merged commit 1a1b988 into wisp-lang:master Jun 9, 2013
@Gozala
Copy link
Collaborator

Gozala commented Jun 9, 2013

Awesome thanks!

@Gozala
Copy link
Collaborator

Gozala commented Jun 9, 2013

(Maybe the embeddable file is worth mentioning in the docs? I know I searched for it the first time and was very puzzled ... :) )

Mind sending a pull request for that as well ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants