Reasons to use D
Sebastiaan Koppe via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 12 04:36:46 PDT 2015
On Saturday, 12 September 2015 at 04:05:44 UTC, Adam D. Ruppe
wrote:
> On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote:
>> That is not the only way it behaves differently. jQuery's
>> html() will actually execute inline script, whereas innerHTML
>> won't.
>
> I'm pretty sure it is the other way around...
I suppose you mean changing the contents of an existing script
element. I was talking about inserting a new inline-script via
html().
Run this in the console on this page:
$("#copyright").html("<script>alert(42);</script>"); // shows
42
document.querySelector("#copyright").innerHTML =
"<script>alert(42);</script>"; // nothing
More information about the Digitalmars-d
mailing list