Use safer setAttribute method as context[attr] = attrs[attr] wasn't setting frameborder=0
use _appyAttrs