System: On start of layout -> AJAX: Request wordlist.txt (tag "LoadWordlist")
AJAX: On "LoadWordlist" completed -> const textData = AJAX.LastData
const words = textData.split(/\r?\n/);
const validWordsDictionary =
runtime.objects.ValidWordsDictionary.getFirstInstance();
words.forEach(word => {
if (word.length <= 7) {
validWordsDictionary.add(word, true);
}
});
Above is my code using c3 and part of it in JS. I've also created an AJAX object as well as a dictionary object named ValidWordsDictionary. The wordlist.txt is also included as a file within the project.