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

6
LINES

< > BotCompany Repo | #1033612 - jsOnContentLoaded - pure JS replacement of $(document).ready

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

Transpiled version (4560L) is out of date.

sS jsOnContentLoaded(S code) {
  ret empty(code) ? ""
    : [[document.addEventListener("DOMContentLoaded", function() { ]]
      + code
      + [[ });]];
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033612
Snippet name: jsOnContentLoaded - pure JS replacement of $(document).ready
Eternal ID of this version: #1033612/3
Text MD5: 4d588f80d5a8e6e868a2d9865b23fbae
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-16 00:29:14
Source code size: 161 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 8 / 21
Version history: 2 change(s)
Referenced in: [show references]