349 questions
0 votes
0 answers
298 views
iFrame attribute allowpaymentrequest vs allow="payment" and why does Google Pay not use the correct "standard"
Picture the scene, an iFrame inserted into your React application, but lo, you have an issue getting Google pay to work so you're told to add allowpaymentrequest as an attribute for the iFrame. Simple ...
14 votes
2 answers
34k views
Can Axios be used in new next.js 13 instead of extended next fetch api version?
Hey guys, can I use axios with next.js 13 and still get the same results of their extended fetch api version with cache and revalidate configs ?? Is axios going to this web-standard thing direction ??...
2 votes
1 answer
59 views
Is there a standard way to get HTMLSelectElement from HTMLOptionElement?
HTMLSelectElement currently provides HTMLSelectElement.options property to access all its options children regardless of optgroup in the way. But, the reverse is not known. Currently, we need to ...
0 votes
1 answer
121 views
There’s no standard specification for JavaScript's backend APIs?
I’m writing an article on JavaScript and a question came up. JavaScript has Web APIs as its standard specification for the browser. There’s no standard specification for JavaScript's backend (Node and ...
0 votes
1 answer
344 views
RESTful API for filtering by two models simultaneously
Suppose I have two models, Order and Customer. I've implemented an API that lets you filter on both: /orders?status=fulfilled /customers?city=Atlanta But what if I want to search for orders in a ...
2 votes
1 answer
335 views
Enqueuing function to run after all events on current form are handled
I have a form with a formdata event handler that updates a field of the FormData if a certain state is found in the DOM. After the form submission, the DOM needs to be changed, but the formdata event ...
1 vote
1 answer
298 views
Detect old Internet explorer Javascript functions ( < ES6)
There is a web online, library or something to detect old IE functions that are not compatible with Chrome/Firefox or just ES6? Like: document.all, event.returnValue, etc JsHint/Jslint are not ...
0 votes
1 answer
571 views
What's better UX/accessibility: disabled button or link with .active state? [closed]
I have a news feed page with two display options: "All Content" and "Personalized Content". I need some buttons or links to let users move between these two options, which involves ...
1 vote
2 answers
2k views
x509 public key to JWK in web-workers environment
I want to verify "firebase JWT token" on "Cloudflare workers" environment. The problem is firebase-auth doesn't provide the standard /.well-known/jwks.json,rather they provide x806 ...
3 votes
2 answers
689 views
How to interpret caniuse website information?
I wanted to check what is the support of fetch API in browser so I opened caniuse.com to get this information. Looking at Chrome browser I see this feature is available since version 42 (which ...
0 votes
1 answer
44 views
Issues Recreating Http Headers from an older application
I am having an issue uploading files to my server on a frontend rewrite I am working on. I am getting an error response 500 "Premature end of script headers:" I have my headers recreated ...
-1 votes
1 answer
2k views
Is returning true/false for a function as indicator for success/failure considered a good standard in JS?
Im trying to understand something regarding JS standards: When writing an async function or any function that returns any kind of promise I need to assume that the user of this function will want to ...
0 votes
2 answers
1k views
Get partial range of ReadableStream
I want to return a specific byte range given a ReadableStream. It sounds easy but I can't find any way to skip through or read a specific amount of bytes from the stream since we can only read chunks. ...
0 votes
1 answer
330 views
Best practices for POST/DELETE links on HTML
I don’t want to use GET method for some destructive links (like deleting an item, remove something…) so I use POST or DELETE actions on my links, with a Javascript AJAX request like this: <a class=...
3 votes
0 answers
223 views
Do different browsers offer different set of Web APIs?
As per this link https://developer.mozilla.org/en-US/docs/Web/API, there are a set of Web APIs which are the standard APIs as per w3c definition. However, I could not find information regarding the ...