Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [javascript]

For questions about programming in ECMAScript (JavaScript/JS) and its different dialects/implementations (except for ActionScript). Note that JavaScript is NOT Java. Include all tags that are relevant to your question: e.g., [node.js], [jQuery], [JSON], [ReactJS], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

javascript
0 votes
0 answers
5 views

streaming a video into a web player using javacsript (react component)

I am using Javascript, however the possibly important caveat is in a WebView. I have a stream of data which is an mp4 that I can retrieve like so window.runtime.EventsOn('playback-continue'...
amlwwalker's user avatar
  • 3,252
0 votes
0 answers
8 views

Difference between {} as an object and {} as empty block scope in JS

let a=10; {} //empty block scope //lets say there is an object let b ={}; so, how does js differentiate between the two ? console.log({}=={}) ( as an example ) is there a way where we can use {} as ...
Rizwan Saifi's user avatar
0 votes
0 answers
4 views

How to style Mapbox' Heatmap

I have this GeoJSON (can be downloaded here). The data is distributed through a grid, thus the points are distributed regularly. However, each point has a different "weight" via the prop ...
four-eyes's user avatar
  • 12k
0 votes
0 answers
11 views

What is the equivalent JavaScript syntax to Python's rawstring syntax r"" (instead of rf"")?

In Javascript, we can use the ES6 raw string String.raw`raw text` to form a raw string, but it uses the template string syntax at the same time. If I want to store the string "${a}\\${b}, with \\...
Tastror's user avatar
0 votes
0 answers
10 views

EJS isn't being rendered

I'm making a rock, scissors, paper game on the backend of Node.js with express server, frontend.js client-side, index.ejs and main.css files. I firstly want to render a string line of the result of ...
Yuval Yanay's user avatar
2 votes
1 answer
14 views

Is there a way to activate the printing header and footer using JS or CSS?

I've heard about @page in CSS, that can change margin, orientation, page break, but my question is: Is there a way to activate the "Headers and footers" option, for that when I open the ...
Henrique Dias's user avatar
-1 votes
0 answers
6 views

Responsiveness problem with my div using Vue and Tailwind (Keeping the width when it should shrink)

<div class="flex flex-col bg-sky-600 bg-opacity-35 w-full overflow-y-hidden h-auto max-h-64 px-5 rounded-lg shadow-md pt-5 text-white shrink scroll-smooth"> <h1>TODAY'S ...
Yasin's user avatar
  • 1
0 votes
0 answers
4 views

Passing an object to a route with vue-router

Based on this from vue-routers site it seems as though you can pass an object as a prop. However, everytime I try to do this it seems to it fail saying invalid param My route is defined as follows: ...
Qiuzman's user avatar
  • 1,471
0 votes
0 answers
6 views

Linking to emulator

Has anyone got any idea why this emulator won't link directly? It accepts code from the address bar and links from scruss.com okay https://scruss.com/blog/2018/07/02/moar-10print-nonsense/ I want to ...
Oggy Osborne's user avatar
0 votes
0 answers
13 views

Can I be sure that the application/json header is only set on ajax requests?

I need to distinguish browser requests from ajax requests and can see that when making a request via a form submission in regular HTML, I get the following value for the accept header: text/html,...
Oscar R's user avatar
  • 452
0 votes
0 answers
8 views

Mark table with swipe gesture on mobile phone

I have the following code: index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content=&...
r5tr3's user avatar
  • 134
0 votes
0 answers
12 views

Show custom HTML in Firefox add-on popup/dialog

I'm learning how to make an extension (for Firefox). This add-on reads the youtube main page (https://www.youtube.com/) and get the visible videos on it. From those videos, I'm able to extract the ...
Mauricio Arias Olave's user avatar
0 votes
1 answer
13 views

Refresh / Reload page on pause youtube iframe api

I have a problem with my code. I want to refresh the page on pause or exit of full screen. The exit on Full screen works. The pause using the youTube iframe API does not "onstatechange". ...
Tone's user avatar
  • 19
-2 votes
0 answers
34 views

How can I make all my images to fit in the screen? [closed]

const names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", ]; ...
Alex's user avatar
  • 91
0 votes
0 answers
8 views

Hide page count from the go to section of the pdf toolbar when pdf is opened in browser

From java side I am converting tiff images to PDF like below. Rectangle pagesize = new Rectangle(maxWidth, maxHeight); Document document = new Document(pagesize); PdfWriter.getInstance(document, ...
Raju Kumar Shah's user avatar
0 votes
0 answers
27 views

How to automatically change the background color on left side of an HTML range slider?

I'm making an HTML music player project and I'm trying to make the left part of the <input type="range" value="0"> slider be black. The slider is to show how much a song has ...
user26529736's user avatar
0 votes
0 answers
12 views

How to create coupon/paywall in an Elementor Pro page for FREE

Hi there masters good day! Is it possible to create a page with a coupon code form, then the selected visitors need to enter the valid coupon code I emailed to them, and if the coupon code they ...
troyds's user avatar
  • 65
1 vote
2 answers
26 views

PHP HTML JS pagination

I have a page which feedbacks which looks like this (I just show 1 comment per page to see if the pagination works fine. Otherwise I'll show more): The feedbacks come from a mysql database and are ...
Andy McRae's user avatar
0 votes
0 answers
7 views

Download/Preview files in MS Teams from mobile device in custom teams application

I'm facing a wall on how to be able to download/Preview a file from a Microsoft Teams app on mobile. We have a custom Microsoft Teams application. In our application we have files that users should be ...
Caribouflex's user avatar
-1 votes
0 answers
11 views

Show price variation inside the attribute button in WC

I am using WooCommerce and the Flatsome template. I need to show the price of the variation inside the attribute button, even when the variation is not selected. This is the code I am using (taken ...
Gaston Coroleu's user avatar
0 votes
0 answers
13 views

Simple sticky scroll effect causes glitch on mobile browsers

I wanted to use a scroll effect (parallax + filters) in a very simple page. It's just a sticky 120vh div with a background image and some text. Everything works fine in the desktop browser and with ...
Moritz Roessler's user avatar
0 votes
0 answers
6 views

Context Load before Client? react-native

i created a context to start up the socket but before that it validate the token sending a request to the server. there is an issue that i can't really figure it out. if the app is closed and i open ...
anfield's user avatar
  • 33
0 votes
0 answers
10 views

React & Cypress Component Tests: How to pass an object to an imported library in the Cypress setup?

I'm setting up Cypress to run component tests on a React-based app. The app uses multiple libraries, which I cannot change in any way. Although the app runs perfectly well, I'm unable to get any ...
Dorian Fabre's user avatar
0 votes
1 answer
8 views

How to build a Vue web component which reflects an internal state as an attribute?

I am building a web component input which looks like this with Vue 3: <my-input value="Search"></my-input> How can I make sure that the value attribute is always equivalent to ...
leonheess's user avatar
  • 19.9k
0 votes
0 answers
26 views

Vue 3 and Vitest focus input sets document.activeElement to HTMLBodyElement in test in composition API

Given a Vue 3 component <template> <input id="input" type="text" @focus="handleOnFocus($event)" /> </template> <script setup type="ts">...
mummybot's user avatar
  • 2,750
0 votes
0 answers
3 views

Filter nodes in quasar tree with lazy loading

How can I filter nodes in an quasar tree component when I have lazy child nodes ? The problem is that when I have an lazy loading system, I need to open the entire tree in order to filter, ortherwise ...
Igor Barcelos's user avatar
0 votes
0 answers
7 views

How to get "supportedAbis" on android browser

How can i get at least one supported ABI of android device through website on android browser? I just want supported ABI name like (arm64-v8a, armeabi-v7a, x86-64) of android device through website ...
Sunny's user avatar
  • 1
0 votes
0 answers
7 views

NodeJS WebRTC - RTCAudioSource - Expected a .byteLength of 480, not 2770

I'm trying to have my nodejs backend act as a peer that streams pcm audio to the browser via webrtc (https://github.com/WonderInventions/node-webrtc). (let's assume it's the only way to achieve what I ...
Royi Bernthal's user avatar
-4 votes
0 answers
28 views

thay đổi màu ký tự bằng css trên blogspot [closed]

I want to change all the colors of the chords with the form [Am]. [Dm] [C] on all my posts from timhopam.com to red by default for easy distinction. Please guide how to change them by Css or ...
Mr Nguyên's user avatar
0 votes
0 answers
12 views

Mock static method of object in react jest

I want to mock a static method defined outside a component. Here is my component: import Authenticate from '/api/Authenticate'; export default class MyComponent extends React.Component { render() { ...
Sonam's user avatar
  • 1
0 votes
0 answers
5 views

Mapbox: Text of the point/circle behind is visible over the point in front

I want to show the points and to write data inside. Problem is that the data (numbers) are shown for the points behind instead of the ones in front. I would also like for smaller number circles to ...
Luka Ladisic's user avatar
0 votes
0 answers
13 views

Manipulate data for Row Span logic in ag grid

I have an ag grid with row spanning and I am able to do row span for first and second column. Can anyone please help me for row span logic for rest of the columns (notes, votes)? I think row span ...
Kj Shah's user avatar
0 votes
0 answers
15 views

Webpack: How do I replace <use> tag with actual svg data?

My index.html uses a svg in this way: <button class="button--settings" id="button_settings"> <svg role="img"> <use href="assets/images/...
Bromanius's user avatar
0 votes
1 answer
34 views

How can the input value be enclosed in a variable?

I'm trying to create a component that will have an input and a button. In input, the user enters his nickname. This nickname, that is, the input value, must be stored in a variable. This variable is ...
zzhuravleff's user avatar
0 votes
0 answers
21 views

Why is my horizontal rule element not visible in the tooltip?

How can I customize the tooltip to my liking? Nothing I try seems to work. formatter: function() { let total = 0; let tooltipHtml = `<strong>${this.x}</strong><br/>`; ...
Илим KGZ's user avatar
0 votes
0 answers
11 views

VS code extension - Gutter icons

I am currently using codelens inorder to click and proceed to action , How do I add gutter icon with quick pick menu to show actions , Thanks The set/get decoration endpoint doesnt seem to be working ...
Harsha Aditya's user avatar
0 votes
1 answer
28 views

How to fetch data for Client Components on server-side

When I say Client Components -> I mean files that uses use client at the top of it, and Server Components — files that are using use server accordingly Nobody says, how to fetch data on the server ...
Ahmed Faraz's user avatar
0 votes
0 answers
14 views

How to generate openapi doc in express

I'm making a REST service using javascript and express. I have some endpoints and I wanna create a swagger file to serve along with it. I'm using swagger-autogen to generate the swagger file. Even ...
CantBlameM3's user avatar
0 votes
0 answers
18 views

element plus key How do I set the key for select v2 [closed]

How do I set the key for select v2 to prevent the entire visual list from being refreshed during virtual scrolling and reuse the dom using vue's diff algorithm <template> <el-select-v2 ...
Shuo Chen's user avatar
0 votes
0 answers
12 views

Data resolution are not changing when try to minimize the resolution

In Firefox browser, when opened in normal form all data moves towards right, while it appears correctly in Chrome and Edge. Also when I tried to minimize the resolution in edge or chrome all data ...
Pam's user avatar
  • 15
0 votes
2 answers
20 views

Htmx on custom events

I'm trying to use htmx triggers and custom events without success. I'm using custom events because I'm going to trigger multiple refresh in a page. My source is very simple, but I cannot make it work: ...
Dario Basset's user avatar
0 votes
1 answer
19 views

require not defined error while deploy vite-react app

While deploying a vite-react app in Netlify I am getting white screen and require not defined error. I tried removing "type":"module" from packag.json file.enter image description ...
Mayank Kumar's user avatar
0 votes
0 answers
14 views

Does Date object in browser update timezone correctly after changing system timezone frequently on Ubuntu?

I am encountering an issue where the browser timezone information becomes incorrect after changing the system timezone multiple times on my Ubuntu PC. Specifically, the Date object in my browser ...
Muhammad Junaid's user avatar
0 votes
0 answers
38 views

Cancel function

I have a component on the search page, and inside the component, there is a useEffect that triggers the post filtering and fetching code from the database when the search words (city, word in post, ...
-1 votes
2 answers
32 views

Is there a way to select all elements of class ("btn") whose parents are of class ("seat") using javaScript and change it's background color?

I am trying to implement a bus seat layout. I want seats to change it's background color when clicked. The seats are bootstrap radio buttons with class='seat' and labels with class='btn'. I have tried ...
Balup's user avatar
  • 5
0 votes
2 answers
36 views

Unable to add request-header to POST request [duplicate]

I am hitting the API by using payload and in headers giving Content-Type : 'application/json' still in browser in request headers I'm seeing Content-Type : 'text/plain' Because of that in the backend ...
Shirish's user avatar
2 votes
0 answers
31 views

Detecting CSS @scope support with JavaScript

Is there a way to detect @scope support via JavaScript? I've tried: CSS.supports('@scope') or CSS.supports(':scope') but both of those are returning false in browsers that do support it. I tried CSS....
DEfusion's user avatar
  • 5,573
0 votes
1 answer
33 views

Display an Alert When User Session Expires in Laravel

I am using the Laravel framework and would like to create an alert when the session expires. I tried implementing a JavaScript code that checks if the user is logged in every three seconds as follows: ...
Rodrigo Franco's user avatar
0 votes
0 answers
32 views

Html not loaded even after window.addEventListener('load', do_something) is invoked

I'm working on a browser extension that scrapes data from a webpage. I've added a method to scrape data, which is invoked via a load listener: window.addEventListener('load', scrapeSomething) However, ...
Tharun Reddy's user avatar
0 votes
0 answers
5 views

Jest - react-native-color-matrix-image-filters/dist/CMIFColorMatrixImageFilterNativeComponent.js: Could not find component config for native component

I have a React Native Android project and I just upgraded the react-native version from 0.72.3 to 0.74.3. After a fair amount of library upgrading, TS and Lint fixes, etc I was able to get my ...
Onyx's user avatar
  • 5,546

15 30 50 per page
1
2 3 4 5
20