removing CoffeeScript.activate() simply including the tag will do for text/coffeescript

This commit is contained in:
Jeremy Ashkenas
2010-02-24 23:57:39 -05:00
parent 23c5ebb00f
commit 22674bc536
6 changed files with 20 additions and 35 deletions

View File

@@ -40,7 +40,6 @@ exports.tree: (code) ->
# Activate CoffeeScript in the browser by having it compile and eval
# all script tags with a content-type of text/coffeescript.
exports.activate: ->
scripts: document.getElementsByTagName 'script'
for script in scripts when script.type is 'text/coffeescript'
eval exports.compile script.innerHTML
if document? and document.getElementsByTagName
for tag in document.getElementsByTagName('script') when tag.type is 'text/coffeescript'
eval exports.compile tag.innerHTML