Message from JavaScript talks

July 2017

— Heh, weird case

— 

$(document).ready(...) fires when the page is done loading, so the only way to re-trigger that event is to reload the page, or globalize the function

— 

function onload() {
// do stuff
}

$(document).ready(onload);

— This way you can call it yourself with onload()

— Well I figured my problem out, but now I see I need a huge algorithm refactor

— Where a single template has a single data source, if you pass an array containing data source objects, then each one can be injected into a seperate template, making the paging system a loop which makes elemPerPage number of clones and inserts them

Message permanent page

— Right now my algorithm to do that is... not really capable of doing that

— Uhhhh

— ¯\_(ツ)_/¯

— 

function insertionThunk (templDoc) {
if (conf.paged) {
var templDocs = [];
for (var loc = 0; loc <= conf.elemPerPage; loc++) {
templDocs[templDocs.length] = newFragmentClone(templDoc);
}
} else {
var templDocs = [templDoc];
}
return insertTemplate(injectData(templDocs, conf), destElems, conf);
}

Message permanent page

— Heavy use of this thunk in 5 different places, so it seems like a good candidate to insert this logic

Message permanent page

— Is that a 1 or an L?