在 Smart Mobile Studio 中调用 javascript 函数(如 'window.open()')的最佳方式

Best way to call a javascript function like 'window.open()' in Smart Mobile Studio

我正在评估 SMS 并且非常享受这种体验。我需要使用 window.open() 在浏览器上打开一个新的 window/tab。我已经使用 asm 块完成了这项工作,但我忍不住觉得有一种我不知道的更好的方法。那么,是否有更多的短信方式来执行以下操作?

  asm
    window.open('MyPDF.pdf');
  end;

非常感谢。 问候, 威尔.

传统上这是唯一的方法,但在最近的 Smart 版本中,您也可以使用 BrowserAPI 入口点。

uses SmartCL.System;

BrowserAPI.Window.open('MyPDF.pdf');