From c0d1714e0a2ae1ad6bde072193f554ce9ec6fb71 Mon Sep 17 00:00:00 2001 From: Mauro de Wit Date: Sat, 10 Feb 2018 23:03:17 +0100 Subject: [PATCH] Added methods to expose the scrollY value and body offset (#324) Add methods to expose the scrollY value of the window and the offset of the body. --- jso/apis/src/main/java/org/teavm/jso/browser/Window.java | 3 +++ jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java index 0f00d8f5a..2c2dad463 100644 --- a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java +++ b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java @@ -66,6 +66,9 @@ public abstract class Window implements JSObject, WindowEventTarget, StorageProv @JSProperty public abstract int getOuterHeight(); + @JSProperty + public abstract int getScrollY(); + @JSProperty public abstract String getName(); diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java index bdaf7ed79..30e172de5 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java @@ -114,6 +114,9 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget @JSProperty int getScrollHeight(); + @JSProperty + int getOffsetHeight(); + @JSProperty @Override HTMLDocument getOwnerDocument();