diff --git a/src/dom/dom.js b/src/dom/dom.js index 861eb9f..b912758 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -171,8 +171,21 @@ Element.Methods = { * Replaces _the content_ of `element` with the `newContent` argument and * returns `element`. * + * `newContent` may be in any of these forms: + * - [[String]]: A string of HTML to be parsed and rendered + * - [[Element]]: An Element instance to insert + * - ...any object with a `toElement` method: The method is called and the resulting element used + * - ...any object with a `toHTML` method: The method is called and the resulting HTML string + * is parsed and rendered + * * If `newContent` is omitted, the element's content is blanked out (i.e., * replaced with an empty string). + * + * If `newContent` is a string and contains one or more inline `