Hello,
Firstly I want to thank you for sharing this awesome project.
Then I really like to be able to add custom events in my custom fetchTemplate function, and catch them like other tailor event.
I explain the context :
I got templates containing fragments. Those templates are made of "old scaring legacy code", and have there "own live" : they can add cookies or other stuff.
I have a custom fetchTemplate with an axios method to get my template. On axios call, I can access all my template response header, including set-cookie, filled by my template.
I want go transmit this cookie header to my rendered page.
That's why I think about using events, as tailor does.
My issue is that I can't create an event emitter that I can pass to my fetchTemplate.
I see a solution : add tailor instance as argument to fetchTemplate function ? (it is in request-handler.js file)
Do you think it's possible ?
I can create a pull request if you want.
I hope I'm clear enough,
Thanks for reading ;)