(String anchorId)
| 51 | } |
| 52 | |
| 53 | protected void select(String anchorId) { |
| 54 | addWebViewTask(() -> webView.getEngine().executeScript("var newAnchor = document.getElementById('"+anchorId+"');" |
| 55 | + "if (newAnchor !== null) document.body.scrollTop = newAnchor.getBoundingClientRect().top + window.scrollY;" |
| 56 | + "if (window.hasOwnProperty('anchorElem') && window.anchorElem !== null) window.anchorElem.classList.remove('selected');" |
| 57 | + "if (newAnchor !== null) newAnchor.classList.add('selected');" |
| 58 | + "window.anchorElem = newAnchor;")); |
| 59 | } |
| 60 | |
| 61 | protected double getScrollTop() { |
| 62 | Object result; |
no test coverage detected