Given other questions on the same topic I feel I understand the apparent justifications for concatenating the <script>
tag as '<scr'+'ipt..'
in a javascript string, even if this itself is misguided.
However, looking at the code for the Instapaper bookmarklet I see d.createElement('scr' + 'ipt')
. The relevant part of the code (beautified) is at the end of the question.
Even if this (anti-)pattern is to avoid the HTML parser balking at the markup after the occurrence of the closing <script>
tag within a javascript string, I can see even less justification for doing it here given the concatenated text does not even represent a <script>
tag.
In this case, is this done for some other reason?
javascript: function iprl5() {
var d = document,
z = d.createElement('scr' + 'ipt'), //???
b = d.body,
l = d.location;