runThis = function runThis() {
      var that = function () {};

      // Property visible to JavaScript.
      that.fixed = "Property named fixed";
      // Method visible to JavaScript.
      that.log = function () {
        log('Called from JavaScript via the Sketch script RunThis object.');
        return true;
      };
      // Method returns whether a selector should be hidden
      // from the scripting environment. If "false" is returned none is hidden.
      that.isSelectorExcludedFromWebScript = function (selector) {
        log('selector');
        log(selector);
        return false;
      };
      // Method returns whether a key should be hidden
      // from the scripting environment. If "false" is returned none is hidden.
      that.isKeyExcludedFromWebScript = function (key) {
        log('key');
        log(key);
        return false;
      };

      return that;
    }
The first script call creates the panel with the saved HTML page.
The following script calls execute the JavaScript calls in the webView.