Skip to main content

All Questions

0 votes
2 answers
29 views

Javascript dynamic javascript file loading then execution

here is the execution of my javascript: ee_btn.addEventListener('click', () => { //Ajax GET request to get data form and rendering it RequestEEFormData(container, bounds).then(()=&...
mathieu lefrancois's user avatar
1 vote
0 answers
47 views

Why does async/await sometimes lead to slower execution than raw Promises? [closed]

I've been working with JavaScript for a while and often prefer using async/await for readability. However, I recently ran into a situation where switching to raw Promises (using .then) actually ...
0xMohamed's user avatar
-1 votes
1 answer
79 views

How to receive a "stream of input" using XMLHttpRequest object?

I have a javascript file which creates a XMLHttpRequest object and opens a connection to a PHP file and sends a form object to it. The Javascript file is like this: let formData = new FormData(); ...
Abb's user avatar
  • 71
0 votes
1 answer
63 views

Javascript async click event issue

I'm bulding a website using Javascript to create some page transition effect to avoid reloading pages. The interface of the website is divided in 2 parts. The first part is the menu that is present in ...
Mathieu Préaud's user avatar
-2 votes
1 answer
41 views

Can I avoid awaiting an async function if no return is expected or required [duplicate]

I think I understand async/await but I am confused by a part I have reached in my code in a very common scenario. I have an async function createOrder() that processes orders. Before that function ...
volume one's user avatar
  • 7,583
2 votes
2 answers
67 views

Waiting for all async requests to complete with concatMap

assuming that there are multiple ajax requests that need to execute one by one sequentially, the next one should be called when the previous is done. I can achieve that by using the concatMap RxJs ...
Semen Shekhovtsov's user avatar
1 vote
1 answer
52 views

How / Is there a way to have a generic algorithm function work with both sync & async functions?

I'm trying to do this in TypeScript, but I think the question is broader than TypeScript and applies to JavaScript as well, hence both tags. I'm writing some generic algorithm functions (e.g. Nelder-...
Niobos's user avatar
  • 930
2 votes
0 answers
82 views

JavaSript request in infinite loop stoped after few minutes

Im using the Javascript to read data from digital sensor connected to Raspbery PI (In this case - Rotary Encoder, but it's not that important. This it could be anyone another sensor or controller). In ...
Денис Штукин's user avatar
4 votes
3 answers
328 views

Determine if async function is nested or runs in parallel

This is a async function that does a sqlite transaction: async transaction<V>(done: (conn: this) => V): Promise<V> { this.depth += 1; await this.execute(`SAVEPOINT tt_${this....
Alex's user avatar
  • 66.3k
0 votes
0 answers
59 views

Html2canvas runs sequentially when using promise.all

I have the following code, when I check the runtime log, log, and request time that html2canvas calls, I see the code is running sequentially instead of "parallel". My DOM is quite small but ...
đô vũ's user avatar
1 vote
0 answers
42 views

Async context tracking, async_hooks

I'm trying to better understand the output from node async_hooks. It's not giving me the output I expect. Specifically, I'd expect that each new async function creates a new asynchronous context. So ...
libby's user avatar
  • 644
1 vote
1 answer
46 views

Angular ngOnChanges Not Updating Component Variables When @Input() Changes

I have an Angular component that receives an @Input() property from a parent component. The parent component fetches data asynchronously (from an API), and when the data is set, ngOnChanges should ...
Abrew Abraham Alex's user avatar
0 votes
0 answers
44 views

Can't access the property but after 1 second I can access it (async&await) [duplicate]

I want to make my own game in vanilla js to practice my skills with canvas and vanilla js. I have a problem with async and await in my code and I can't understand what it is. So I need to get the file ...
amirreza asgari moonboy's user avatar
0 votes
1 answer
53 views

loading script tag manually in react project

I want to load a widget from Bookeo site into my site they provide a script tag which I have to add into my site and they handle the rest, I wrote the code and every thing is working the script tag is ...
Anas Mostafa's user avatar
0 votes
2 answers
90 views

Nodejs behavior with multiple I/O calls

I understand that nodejs uses libuv library for I/O tasks. By default libuv uses four threads for handling I/O tasks. I am trying to understand the behavior of libuv when more than four I/O tasks are ...
ariko stephen's user avatar

15 30 50 per page
1
2 3 4 5
952