JS debug

Duplicate of setAttribute removed