Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1003126 // hjavascript - make <script> tag for JavaScript (or link script)

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (3383L) is out of date.

sS hjavascript(S scriptOrURL, O... _) {
  if (isRelativeOrAbsoluteURL(scriptOrURL) && !startsWithOneOf(scriptOrURL, "//", "/*"))
    ret hjavascript_src(scriptOrURL, _);
  else
    ret tag script(scriptOrURL, paramsPlus(_, type := "text/javascript"));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003126
Snippet name: hjavascript - make <script> tag for JavaScript (or link script)
Eternal ID of this version: #1003126/6
Text MD5: 529158e289829a88cd65cf69200c4e77
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-24 18:29:11
Source code size: 258 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 725 / 866
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1008424 - hscript - synonym of hjavascript - make <script> tag for JavaScript
#1013376 - hjavascript_src - make <script> tag with link to source
#1013901 - hworkerscript - make <script> tag for web worker
#3000382 - Answer for ferdie (>> t = 1, f = 0)