getAttribute( name, type ) {

		const attributes = this.attributes;

		// find attribute

		for ( const attribute of attributes ) {

			if ( attribute.name === name ) {

				return attribute;

			}

		}

		// create a new if no exist

		const attribute = new NodeAttribute( name, type );

		this.registerDeclaration( attribute );

		attributes.push( attribute );

		return attribute;

	}
Returns a node attribute for the given name and type.

@param {string} name - The attribute's name.
@param {string} type - The attribute's type.
@return {NodeAttribute} The node attribute.