element.erase( 'html' ) sets content to text 'undefined' #2182

Closed
michaelcm opened this Issue Dec 21, 2011 · 0 comments

2 participants

@michaelcm

This fiddle captures it all - this is new in MooTools 1.4.2 (or 1.4.1, was upgrading from 1.4.0):
http://jsfiddle.net/YxcqX/

This document [ http://mootools.net/docs/core/Element/Element#Element:erase ] defines the property to be:
This is a "dynamic arguments" method. Properties passed in can be any of the 'erase' properties in the Element.Properties Object."

The link to "Element.Properties" includes http://mootools.net/docs/core/Element/Element#Element-Properties:html

So html should by emptied not set to the text 'undefined'.

This was reproduced with Chrome 16.

@arian arian added a commit to arian/mootools-core that referenced this issue Dec 24, 2011
@arian arian Fixes #2182 - Element.erase('html') should set the innerHTML to an em…
…pty string.

Element.properties.html.erase was aliased to Element.properties.html.set, but when calling it without any arguments this resulted in .set(undefined).
4adb41a
@ibolmo ibolmo closed this in 4086f20 Jan 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment