removeAttr
Remove a property from a Map.
map.removeAttr(attrName)
Parameters
- attrName
{String}
:the name of the property to remove
Returns
{*}
:
the value of the property that was removed
removeAttr
removes a property by name from a Map.
var people = new Map({a: 'Alice', b: 'Bob', e: 'Eve'});
people.removeAttr('b'); // 'Bob'
people.attr(); // {a: 'Alice', e: 'Eve'}
Removing an attribute will cause a change event to fire with 'remove'
passed as the how parameter and undefined
passed as the newVal to
handlers. It will also cause a property name event to fire with undefined
passed as newVal. An in-depth description at these events can be found
under attr
.