Good morning!

In 16.4 (interpreted mode) we have a web area which displays a web page
that is not under our control. We had devised a way to scrape the webpage
with a custom library of JavaScript files that we kept in the resources
folder. We find that in 16.4 the WA Evaluate JavaScript does not evaluate
the JavaScript from external files.

We recently moved from 15.4 to 16R6 (which was a mistake, since it is not
Mojave compatible). When we did, we had to update various aspects of our
app to work with the new version. The web area was one area that required
our attention. In the end, it appeared that we just needed to check the
'use embedded webkit'. When a development machine was upgraded to Mojave we
were locked out of developing in 16R6, so (at the advice of 4D support) we
quickly changed to 16.4 (which is actively supported).
The problem was that we assumed there would be no significant differences
between 16.4 and 16R6. There were several changes (method name conversions)
that happened automatically, but (more importantly) the WA Evaluate
JavaScript stopped working with our JS code loaded from external files.

Here is the relevant testing code from the web area:
Case of
    : (Form event=On End URL Loading)

          // test the 'fetching' of javascript
        $tJS_path:=Get 4D folder(Current resources
        DOCUMENT TO BLOB($tJS_path;$bDoc)
        $test_js:=BLOB to text($bDoc;UTF8 text without length)
        WA Evaluate JavaScript(wa;$test_js)
          // end test
End case

The parent form:
Case of
    : (Form event=On Load)
        WA OPEN URL(wa;"";)
        WA SET PREFERENCE(wa;WA enable JavaScript;True)
        WA SET PREFERENCE(wa;WA enable Web inspector;True)
End case

'Use embedded rendering engine' is checked.

Has anyone else experienced this? Any suggestions?
4D Internet Users Group (4D iNUG)

Reply via email to