support query syntax for window.document_as