press icon indicating copy to clipboard operation
press copied to clipboard

html5 script tags and no-comment-replace options?

Open peterchappell opened this issue 14 years ago • 2 comments

Hi,

I really like the simplicity of press - thanks for your work on it.

I don't know if you're still actively working on the module but if you are, do you think you could allow for a html5 option for the script tag. It would render a script tag like this:

<script src="/press/js/hash.js"></script>

Also it would be great if you could allow an option not to replace the individual script elements with a corresponding comment.

Thanks again.

Pete.

peterchappell avatar Oct 04 '11 04:10 peterchappell

Hi Peter, I'm not sure what you mean, the script tags should already be rendered like that. Could you explain the difference?

Unfortunately it's necessary to output the comments because press goes through the html after it has been generated in order to determine the order in which scripts should be added to the compressed file. It's not possible to do this at render time, only after rendering has finished.

dirkmc avatar Oct 04 '11 12:10 dirkmc

Hi,

Thanks for explaining about the comments. I understand.

The script tag isn't a big deal - just thought I'd ask.

In HTML5 you don't need the language, type or charset attributes on the script tag. Like I say, not a big deal, just thought that since you had a html/xhtml option you might like to include a html5 one as well.

Thanks again for all your work.

peterchappell avatar Oct 05 '11 00:10 peterchappell