He works with js["appendChild"].apply([span], thisArg: js);
If you do not provide thisArg, as you call Function.prototype.apply with nullas the first argument.
So your Dart call is the same as js:
var div = document.querySelector('div');
var span = document.createElement("span");
span.innerText = "hello world";
div["appendChild"].apply(null, [span]);
js TypeError: Illegal invocation. , div["appendChild"].apply(div, [span]);.
, , js.