Adding 'use strict' to adminimal_theme.js has two major benefits.

The first is maintainability, as it turns common mistakes - which are silently ignored in regular Javascript - into errors.

The second is performance, since browser engines can optimize the script better, as they know they don't have to work around possible allowable mistakes.

The script is already 'use strict' compliant, so this would be an easy win.

Here's is the the MDN documentation for those who are unfamiliar or want to learn more.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bronzehedwick’s picture

Added a patch. Hopefully my naming is correct...I've read a couple pages on drupal.org on how to submit a patch, but I'm getting conflicting information, namely from https://www.drupal.org/node/1820494/git-instructions/8.x-1.x/nonmaintainer and https://www.drupal.org/node/707484.

ANDiTKO’s picture

Status: Active » Closed (fixed)

I dont care about the patch naming at all ;)
All i care is that you spend time creating it and i was able to apply it successfully.

Thanks! Applied to the latest dev, and soon in next stable.

bronzehedwick’s picture

Excellent, thanks!