Adding getRootInstance method
Catch warning on deprecated window object