Add scope attribute to element