Add API to get whether the devtools is opened. 

Closes #21.