From c3ebc0139553f0fcf5bf8acbf469d6c5415144a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 26 Oct 2015 16:13:54 +0000 Subject: [PATCH] Mention quirks with JavaScript "this" in AbstractJavaScript* javadocs Change-Id: I512b861c65f8c0f6c6e8f684cb933cbcc20cdb99 --- .../com/vaadin/server/AbstractJavaScriptExtension.java | 7 +++++-- server/src/com/vaadin/ui/AbstractJavaScriptComponent.java | 7 +++++-- .../vaadin/ui/renderers/AbstractJavaScriptRenderer.java | 8 ++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java index 693f3a28c8..2fb50fe7dd 100644 --- a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java +++ b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java @@ -41,8 +41,11 @@ import elemental.json.JsonValue; *

* * The initialization function will be called with this pointing to - * a connector wrapper object providing integration to Vaadin with the following - * functions: + * a connector wrapper object providing integration to Vaadin. Please note that + * in JavaScript, this is not necessarily defined inside callback + * functions and it might therefore be necessary to assign the reference to a + * separate variable, e.g. var self = this;. The following + * functions are provided by the connector wrapper object: *