View Code? Open in Web Editor
NEW
Report issues and get notified about changes affecting the 'Password Strength Indicator' component.
Home Page: https://codyhouse.co/ds/components/app/password-strength-indicator
cd-password-strength-indicator-changelog's People
Contributors
cd-password-strength-indicator-changelog's Issues
I want to load the zxcvbn library only when I use the component Password Strength Indicator. I tried to load this in this way:
function loadScript() {
var zxcvbn = document.createElement("script");
zxcvbn.src = 'https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/4.4.2/zxcvbn.js';
document.head.appendChild(zxcvbn);
}
if( passwordStrength.length > 0 ) {
loadScript();
for( var i = 0; i < passwordStrength.length; i++) {
(function(i){new PasswordStrength({element: passwordStrength[i]});})(i);
}
};
but this seems doesn't work. It is possible? Is a library that had a size of 400kb and I need only for this component. Thanks!