Fix element clear when document is undefined
Fix element clear when document is undefined

Regression in legacy Firefox driver since b4368224986fd7229f5b31b4e3fa5c1334cc0cea

twalpole/selenium,joshmgrant/selenium,joshbruning/selenium,Dude-X/selenium,5hawnknight/selenium,lmtierney/selenium,mach6/selenium,oddui/selenium,Tom-Trumper/selenium,titusfortner/selenium,jabbrwcky/selenium,oddui/selenium,Ardesco/selenium,Dude-X/selenium,Dude-X/selenium,mach6/selenium,chrisblock/selenium,Tom-Trumper/selenium,jsakamoto/selenium,chrisblock/selenium,lmtierney/selenium,markodolancic/selenium,HtmlUnit/selenium,chrisblock/selenium,SeleniumHQ/selenium,SeleniumHQ/selenium,mach6/selenium,titusfortner/selenium,twalpole/selenium,oddui/selenium,jabbrwcky/selenium,valfirst/selenium,SeleniumHQ/selenium,Tom-Trumper/selenium,Tom-Trumper/selenium,valfirst/selenium,joshmgrant/selenium,asashour/selenium,krmahadevan/selenium,asolntsev/selenium,krmahadevan/selenium,joshmgrant/selenium,5hawnknight/selenium,asolntsev/selenium,Ardesco/selenium,davehunt/selenium,Dude-X/selenium,SeleniumHQ/selenium,Tom-Trumper/selenium,HtmlUnit/selenium,HtmlUnit/selenium,valfirst/selenium,HtmlUnit/selenium,asashour/selenium,mach6/selenium,jabbrwcky/selenium,markodolancic/selenium,HtmlUnit/selenium,twalpole/selenium,titusfortner/selenium,davehunt/selenium,krmahadevan/selenium,Tom-Trumper/selenium,joshmgrant/selenium,markodolancic/selenium,Dude-X/selenium,valfirst/selenium,joshbruning/selenium,lmtierney/selenium,markodolancic/selenium,joshmgrant/selenium,jsakamoto/selenium,valfirst/selenium,lmtierney/selenium,joshmgrant/selenium,markodolancic/selenium,titusfortner/selenium,asashour/selenium,asolntsev/selenium,Tom-Trumper/selenium,joshmgrant/selenium,davehunt/selenium,asashour/selenium,titusfortner/selenium,jabbrwcky/selenium,valfirst/selenium,SeleniumHQ/selenium,lmtierney/selenium,twalpole/selenium,mach6/selenium,joshbruning/selenium,jsakamoto/selenium,Dude-X/selenium,asolntsev/selenium,HtmlUnit/selenium,asolntsev/selenium,joshmgrant/selenium,jabbrwcky/selenium,davehunt/selenium,joshbruning/selenium,lmtierney/selenium,SeleniumHQ/selenium,joshmgrant/selenium,oddui/selenium,Ardesco/selenium,asolntsev/selenium,lmtierney/selenium,davehunt/selenium,titusfortner/selenium,HtmlUnit/selenium,twalpole/selenium,twalpole/selenium,SeleniumHQ/selenium,titusfortner/selenium,Ardesco/selenium,Dude-X/selenium,HtmlUnit/selenium,twalpole/selenium,asashour/selenium,krmahadevan/selenium,davehunt/selenium,valfirst/selenium,jsakamoto/selenium,asashour/selenium,asolntsev/selenium,davehunt/selenium,oddui/selenium,SeleniumHQ/selenium,joshbruning/selenium,mach6/selenium,5hawnknight/selenium,Ardesco/selenium,5hawnknight/selenium,asashour/selenium,mach6/selenium,joshbruning/selenium,Dude-X/selenium,twalpole/selenium,Tom-Trumper/selenium,davehunt/selenium,twalpole/selenium,asolntsev/selenium,joshbruning/selenium,Ardesco/selenium,chrisblock/selenium,chrisblock/selenium,HtmlUnit/selenium,lmtierney/selenium,valfirst/selenium,markodolancic/selenium,lmtierney/selenium,jsakamoto/selenium,5hawnknight/selenium,Dude-X/selenium,jsakamoto/selenium,asashour/selenium,titusfortner/selenium,krmahadevan/selenium,krmahadevan/selenium,jsakamoto/selenium,jabbrwcky/selenium,Tom-Trumper/selenium,valfirst/selenium,joshmgrant/selenium,markodolancic/selenium,Ardesco/selenium,joshmgrant/selenium,oddui/selenium,SeleniumHQ/selenium,titusfortner/selenium,jabbrwcky/selenium,5hawnknight/selenium,oddui/selenium,markodolancic/selenium,joshbruning/selenium,chrisblock/selenium,oddui/selenium,5hawnknight/selenium,5hawnknight/selenium,valfirst/selenium,davehunt/selenium,titusfortner/selenium,Ardesco/selenium,5hawnknight/selenium,mach6/selenium,valfirst/selenium,asashour/selenium,markodolancic/selenium,SeleniumHQ/selenium,mach6/selenium,chrisblock/selenium,HtmlUnit/selenium,Ardesco/selenium,joshbruning/selenium,jsakamoto/selenium,krmahadevan/selenium,krmahadevan/selenium,jsakamoto/selenium,jabbrwcky/selenium,oddui/selenium,chrisblock/selenium,SeleniumHQ/selenium,krmahadevan/selenium,chrisblock/selenium,jabbrwcky/selenium,asolntsev/selenium,titusfortner/selenium