I'm trying to work out if I've triggered a bug or mis-understanding the API usage.
I've written a test page for my extension which simulates DOM manipulation to ensure I tag text areas correctly:
One of the problems I have to deal with is over-exuberant DOM manipulations copying the little edit-buttons I add to the page when they duplicate/clone areas of the page. So I've used the mutation-summary library thusly:
var textarea_observer = new MutationSummary({
callback: handleUpdatedElements,
observeOwnChanges: false,
queries: [
{ // we don't want the source page accidently duplicating our tags
element: "img[class='ewe_edit_button']"
},
{
element: "textarea"
},
{
element: "div[contenteditable='true']"
},
{
element: "div[contenteditable='plain-text-only']"
}
]
});
However on the callback it only refers to one added element, the img (which will get removed). If I comment out the first query I do indeed get the new textarea reported. The two elements are next to each other but they don't contain each other. Have I triggered a bug?
Regards,
Alex.