This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
im reading your latest commits.
im also curious when did this on-page-load
function appeared, since we were only using with-init! until now.
last friday we tried to track down with my colleagues how the initialization is handled in hoplon5 but we got quite confused.
we were expecting to find something like:
if (document.readyState != 'complete') {
window.attachEvent ? window.attachEvent('onload', __ldinsp) : window.addEventListener('load', __ldinsp, false)
} else {
__ldinsp();
}
but didn't quite get what's the bootstrap process.
we tracked back until the init
function, which i assume the hoploninit is calling somehow which is created by boot-hoplon
...it's important for us because we would like to mix in a couple of 3rd party libs and they dont seem to work when we just add them as with-init!
functions
:thumbsup: for the testing setup https://github.com/tailrecursion/hoplon/commit/03d6782102588ae9f0a4a5c721a31e8e356bc211
@onetom: to see the bootstrap process you should look at the cljs namespace hoplon emits from the compiler
the with-init! macro just adds a jQuery(function() {...})
callback, to be executed after the document ready event is fired
i guess the thing that might be confusing is the behavior of the html
, head
, and body
functions
those are necessarily singletons, they exist when the page is loaded and simply mutate the existing document html, head, or body in place
ok, the hoplon6 add-initfn!
is clearer indeed.
i guess i shouldn't bother looking back at the past...
just bite the bullet and make the hoplon6 version work finally.
i didn't do direct jquery for years now, so i was not aware of the jQuery(function(){}) API. i got stuck at the $(document).ready() or something like that. http://api.jquery.com/jQuery/#jQuery3
just the prerendering failure with holpon6 but i havent got to isolating the issue yet
the 2nd thing is this hubspot plugin initialization issue, but that might be gone since we removed the sumome plugin from our page
next week or so we could do some pair programming if oyu want to work through the issues
if you can help to clarify quickly the usage of with-page-load, on-page-load and page-load quickly, that would be probably an immense help
boot-reload fires the "page-load"
event, and the hoplon with-page-load
attaches the body as a callback for that event
alright, i think u gave enough hints so we can answer all these questions for ourselves now. thx.