You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
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 ;)
The text was updated successfully, but these errors were encountered:
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, includingset-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 tofetchTemplate
function ? (it is inrequest-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 ;)
The text was updated successfully, but these errors were encountered: