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.

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

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: 724 / 866
Version history: 5 change(s)
Referenced in: [show references]