I'm writing a Chrome Extension that needs to detect contenteditable
HTML elements (or the elements where a user can type into) on the page where my context script is injected into.
I'm currently doing this:
var objAll = document.getElementsByTagName("*");
for(var i = 0; i < objAll.length; i++)
{
obj = objAll[i];
if(obj.contentEditable &&
obj.contentEditable != 'inherit' &&
obj.contentEditable != 'false')
{
//Yes, this is a content editable element!
}
}
But my method doesn't seem to work in all the sites that I tested it on.
I'm curious, what am I missing there?
PS. Because it's a content script I am not using jQuery to make it more robust.