2022.2

Table Of Contents
StringcontainingapaththatcaneitherbeaURLorapaththatisrelativetothesection/context.
Inordertoretrievefilesfromoutsidethetemplatethefileprotocolissupportedaswellasthe
http/httpsprotocols.
ThecompletesyntaxofafullyqualifiedURLwiththe"file"protocolis:file://<host>/<path>.Ifthehostis
"localhost",itcanbeomitted,resultinginfile:///<path>,forexample:file:///c:/-
somefolder/somecontent.js.
Examples
ThisscriptloadsaJavaScriptfile(fromtheResourcespane)directlyintoa<script>element.
var js = loadtext("js/my-script.js");
results.append(query("<script>").text(js));
Thefollowingscriptloadsastylesheet(fromtheResourcespane)intothe<style>element.
var css = loadtext("css/my-styles.css");
results.append(query("<style type='text/css'>").text(css));
logger
ThisisaglobalScriptLoggerobjectthatallowsloggingmessagessuchaserror,warningorinform-
ationalmessages.ThemessageswillappearintheMessagespane(see"PreflightResultsandMes-
sages"onpage975and"DesignerUserInterface"onpage863).
Methods
Thesearethemethodsoftheloggerobject.
Method Parameters Description
error() message:string Logsanerrormessage
info() message:string Logsaninformationalmessage
warn() message:string Logsawarningmessage
Page 1188