Skip to content

add ajax.js an export#4557

Closed
iwarshak wants to merge 2 commits intophoenixframework:masterfrom
iwarshak:ajax-export
Closed

add ajax.js an export#4557
iwarshak wants to merge 2 commits intophoenixframework:masterfrom
iwarshak:ajax-export

Conversation

@iwarshak
Copy link
Copy Markdown

In Phoenix 1.5.X, the Ajax object was exported from phoenix.js and can be used as a helper function for basic xhr requests. This was really helpful for one-off requests without having to either 1) pull in a 3rd party dependency, or 2) reinvent the wheel.

This PR adds Ajax.js to the exports so it functions as it did in 1.5

@chrismccord
Copy link
Copy Markdown
Member

Unfortunately we only exported it for the test env and it was never officially public. I agree it's not for dependency free Ajax, but the fetch API exits now and can be polyfilled, so you may be better suited there. Making it officially public would be a longer term maintenance burden so not something we should open up. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants