I think you may be misunderstanding the docs there? write should not read the DOM layout, but it can manipulate the DOM.
write