Commit f2a7e90
committed
fix: handle race conditions accessing elements in DOM
Fixed the browser to not appear to be 'ready' to set the body before the
text to be set has been processed.
Otherwise, because the content is set asynchronously in a browser after
the call to browser.setText, it can be that the first call to
document.readyState is done before the browser has processed the request
to modify the page, and therefore document.readyState returns true even
if the page has no content. To fix this, we check that the document has
at least one element before asking for document.readyState.1 parent 234f8b0 commit f2a7e90
File tree
1 file changed
+1
-1
lines changed- org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
0 commit comments