Problem/Motivation
Some of RegExp.test() can replace with method which is defined String.prototype. In core/modules/toolbar/js/escapeAdmin.js, checks that window.location.search includes 'destination='
.
This case can change to window.location.search.includes('destination=')
.
Proposed resolution
Replace possibly RegExp for simple string comparison with
method which is defined String.prototype.