Realm takes DOM root as instance variable