HTMLDocument.InvalidNesting3kaya
The specified range causes invalid nesting
Usage
HTMLDocument::InvalidNesting( String )
Arguments
The String contains details of the error
Overview
This Exception is thrown by HTMLDocument.addInlineElementAt (3kaya) if the start or end positions would cause invalid nesting.
-
p = addParagraph(parent,"This paragraph");
em = addInlineElementAt(p,Emphasis,3,7);
code = addInlineElementAt(p,ComputerCode,6,9);
// this attempts to make <p>Thi<em>s p<code>a</em>ra</code>graph</p>
// which is invalid, and so an Exception is thrown.
This Exception is also thrown by several other functions if you try to add an element inside another element which cannot contain it.
-
p = addParagraph(parent,"");
list = addList(p,Unordered,0);
// lists cannot be contained inside paragraphs, so an exception is thrown
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.