I
I
I'm Yoda2019-02-27 07:10:17
1C-Bitrix
I'm Yoda, 2019-02-27 07:10:17

But what about the analogue of jquery beforeSend in the BX framework?

Hello all comrades!
I'm trying to get rid of jquery, but as it turned out for me, it's not quite easy and there are a lot of reasons for this. jquery has many plugins and is very good in terms of usability. At some point, I decided to abandon jquery inside Bitrix projects, due to the existence of my own js framework. Using BX after using jquery for a long time turned out to be quite simple and fun.
I encountered a banal absence of an event like jquery - beforeSend. There is a possibility that I searched badly, but rummaged through the entire core_ajax.js and did not find it.
BX also has a BX.addCustomEvent function on which you can hang a handler, for example, "onAjaxSuccess" or "onAjaxFailure", but what if you need to do some actions before sending.
If you write a custom handler, tell me where to start? Maybe there is a kind person who wrote and can share the finished tool?
In any case, I will accept any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zemlyanoy, 2019-02-27
@Galamoon

Bitrix recently included vue.js in the standard distribution, this should simplify your task, here is a short instruction

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question