javascript/examples/grapheditor/www/js/Format.js
function isOrContains(container, node)
			{
			    while (node != null)
			    {
			        if (node === container)
			        {
			            return true;
			        }
			        
			        node = node.parentNode;
			    }
			    
			    return false;
			}
function isOrContains(container, node)
			{
			    while (node != null)
			    {
			        if (node === container)
			        {
			            return true;
			        }
			        
			        node = node.parentNode;
			    }
			    
			    return false;
			}
function isOrContains ( container , node ) { while ( node != null ) { if ( node === container ) { return true ; } node = node . parentNode ; } return false ; }
Node.contains does not work for text nodes in IE11
Node . contains does not work for text nodes in IE11