resourceloader: Remove redundant 'window' indirection
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 14 Apr 2019 01:15:55 +0000 (02:15 +0100)
committerCatrope <roan@wikimedia.org>
Wed, 8 May 2019 21:24:30 +0000 (21:24 +0000)
commitdf010dd28453e215f7a59fd731768c6f7eb60e0d
tree8d8415751ff4e812adfcb2e12278cfb436205a1a
parentcd45307ba16230d880ad062da7ccde6fa086729c
resourceloader: Remove redundant 'window' indirection

Use global variables directly as globals, except for the specific
case of accessing it when it may not exist. In those cases we
use the fact that undefined properties of an object yield the
`undefined` value which we can cast to false. Accessing an undefined
variable would yield a ReferenceError exception.

Change-Id: I1d9e9aa5845ba3c756ad6e31358d8594e003b04b
includes/resourceloader/ResourceLoader.php
resources/src/startup/startup.js
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php