Open tbenbow opened 1 month ago
Core will sometimes send a string back to the client that represents a piece of the interface. This has a few pieces to figure out...
What post requests will return an interface string? What is a scenario where they would not send this back? TBD
How do modules trigger this step? Perhaps a module triggers this or perhaps all post requests ask a module for the string. TBD
This function is probably where handlbars templates are compiled. That will require a string from the module and a data object...
const markup = ` <table border="1"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Email</th> </tr> </thead> <tbody> {{#each users}} <tr> <td>{{id}}</td> <td>{{name}}</td> <td>{{email}}</td> </tr> {{/each}} </tbody> </table>` const data = { users: [ { id: 1, name: 'John Doe', email: 'john@example.com' }, { id: 2, name: 'Jane Smith', email: 'jane@example.com' }, { id: 3, name: 'Sam Green', email: 'sam@example.com' } ] }; const template = Handlebars.compile(markup) const compiledMarkup = template(data)
This task has a number of unanswered questions!
Core will sometimes send a string back to the client that represents a piece of the interface. This has a few pieces to figure out...
What post requests will return an interface string? What is a scenario where they would not send this back? TBD
How do modules trigger this step? Perhaps a module triggers this or perhaps all post requests ask a module for the string. TBD
This function is probably where handlbars templates are compiled. That will require a string from the module and a data object...
This task has a number of unanswered questions!