Kaya 0.5.2 reference for HTMLDocument::InvalidNesting

List of functions and data types in HTMLDocument

HTMLDocument::InvalidNesting(String)

Arguments

Usage

This Exception is thrown by addInlineElementAt 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
kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya