[wp-trac] [WordPress Trac] #38809: Better wp namespace in password-strength-meter.js

WordPress Trac noreply at wordpress.org
Thu Nov 17 21:42:36 UTC 2016


#38809: Better wp namespace in password-strength-meter.js
----------------------------+-----------------------------
 Reporter:  afercia         |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  javascript
----------------------------+-----------------------------

Comment (by andg):

 Invoking a `typeof` on the `wp` variable in the IIFE actually returns
 "object", not "undefined", since any variable not otherwise found is
 attributed to the global `window` object by default by the browser.

 But yeah, passing it as a second argument would remove all uncertainties,
 and would probably be a better approach overall.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38809#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list