Port Document/View scripting API to QJSValue-based solution
Differential Revision: https://phabricator.kde.org/D7337