I am using execCommand command to 'Hilite' selected text on the page which is rendered with gecko engine/gtkmozembed.
if ( !document.execCommand("HiliteColor", false, colour) ) {
document.execCommand("BackColor", false, colour);
}
This is working fine with HTML pages. But i have some XML pages( books in xml format). execCommand is not working for those XML pages. It gives warning like
TypeError: document.execCommand is not a function
How can i make execCommand works on XML? Thanks.