summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-04 11:16:13 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-04 11:16:13 (GMT)
commitfad04718e33a47552ee3ead9f4de4ef957b04752 (patch)
treef3376d93dc066bcee276649cd5e163b422d36b04
parentddd3bb07cdd371a04c22eabcaf9b4fa16563132e (diff)
improve test
-rw-r--r--webengineviewer/src/webenginescript.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/webengineviewer/src/webenginescript.cpp b/webengineviewer/src/webenginescript.cpp
index 6f03bf2..f16e315 100644
--- a/webengineviewer/src/webenginescript.cpp
+++ b/webengineviewer/src/webenginescript.cpp
@@ -184,12 +184,12 @@ QString WebEngineScript::scrollToRelativePosition(qreal pos)
QString WebEngineScript::isScrolledToBottom()
{
//TODO
- return {};
- /*
- $(window).scroll(function() {
- if($(window).scrollTop() + $(window).height() == $(document).height()) {
- alert("bottom!");
- }
- });
- */
+ return QString::fromLatin1("qt.jQuery(window).scroll(function() { "
+ " if (qt.jQuery(window).scrollTop() + qt.jQuery(window).height() == qt.jQuery(document).height()) "
+ " { "
+ " return true;"
+ " } else {"
+ " return false;"
+ " } "
+ "});");
}