Store type attribute in script object.