Verify DOM.enable() exists before calling it

This is for #10191 

Targets `release` branch.