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

How it works in brownser ? #176

Closed
lqixv opened this issue Oct 17, 2017 · 1 comment
Closed

How it works in brownser ? #176

lqixv opened this issue Oct 17, 2017 · 1 comment

Comments

@lqixv
Copy link

lqixv commented Oct 17, 2017

I create a html file:

<html>
<head>
<title>Hello World</title>
<script src="mime.lite.js"></script>
<script>
var mime = new Mime();
alert(mime.getType("json")); // etc.

</script>
</head>
<body>

</body>
</html>

when I open it in browser, it not works. Could you tell me how should I do ?

@broofa
Copy link
Owner

broofa commented Oct 17, 2017

I'm not sure what "mime.lite.js" is, but if it's browser-ready version of mime/lite from the wzrd.in CDN, then you can just refer to the mimelite variable, like so: https://jsfiddle.net/z66dann5/

(And, my apologies, the instructions in the README had some mistakes which I've corrected)

@broofa broofa closed this as completed Oct 17, 2017
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

No branches or pull requests

2 participants