ace icon indicating copy to clipboard operation
ace copied to clipboard

Is `script defer` broken...?

Open jpap opened this issue 8 years ago • 1 comments
trafficstars

Using the defer keyword in a script definition as follows,

script defer src="script.js" type="text/javascript"

renders incorrectly,

<script>defer src="script.js" type="text/javascript"</script>

which should instead be

<script defer src="script.js" type="text/javascript"></script>

.

Further, if you place the defer keyword at the end, Ace thinks that it is the script. The code

script src="script.js" type="text/javascript" defer

renders incorrectly as

<script src="script.js" type="text/javascript">defer</script>

when it should be

<script src="script.js" type="text/javascript" defer></script>

.

jpap avatar Mar 22 '17 06:03 jpap

Curiously, if I write,

script defer="" src="script.js" type="text/javascript"

then it renders correctly, and without the ="" part too.

Is this by design? If so, it would be great to include in the documentation!

jpap avatar Mar 22 '17 06:03 jpap