2,526,031 questions
0
votes
0
answers
6
views
What are the necessary headers for hygraph asset upload?
I have gotten the signed upload url which is step one. No matter what I put in the headers for the second fetch request a 412 error is returned (see at bottom). I've become stuck at this point.
const ...
-3
votes
0
answers
48
views
servicenow: I need to reload a form from it's UI Page client script. What is a reliable method? I've tried: 'location.reload();' without success [closed]
Tried the following in the UI Page client script, which did not work:
if (answer === "success") {
location.reload(); // try #1
alert(...
0
votes
1
answer
51
views
Reuse JS code between browser and server with dependency on pngjs
How can I move MyNewClass to MyExistingModule in a way that allows the module to work in both browser and server (node) environments? I've started by writing the new class directly in the HTML.
<...
1
vote
0
answers
31
views
Chart.js - how to add icon (or custom html-code) to legend item?
I have doughnut chart with data related to countries. I want to show country icon in legend before country name. For example what I want to see:
I tried with generateLabels callback, but it displays ...
1
vote
1
answer
40
views
Custom use API Hook Error: Could not find react-redux context value; please ensure the component is wrapped in a <Provider>
I'm trying to learn how to use react-testing-library and having trouble getting started with some of my components. I keep receiving the error in the title, pointing at custom API hooks in the file.
...
-3
votes
0
answers
21
views
Why does console.log(d) throw ReferenceError while window.d and this.d are undefined? [duplicate]
console.log(window.d); //undefined
console.log(this.d); //undefined
console.log(d); // ReferenceError: d is not defined
Why does printing only d cause a ReferenceError?
I want to ...
0
votes
1
answer
44
views
webAuthN registration not finishing
Here is my code for testing the registration of a user, this is temporary as it will be removed once 2 users are set up. This is the front end half.
const btn = document.getElementById('test');
btn....
0
votes
0
answers
23
views
Blob link does not work in iframe html content in local file [duplicate]
let url = (content, type) =>
URL.createObjectURL (
new Blob ([content], {type}));
let cssUrl = url ('#d1 { color: green; }',
'text/css');
let htmlUrl = url (`
<link rel=stylesheet ...
0
votes
2
answers
88
views
React Native can't correctly display number
I'm using React Native for write an application in Android, but it can't correctly display number, Order number is like:18,19,2 ,21,2 ,2 ,picture is below:
Some code is:
<View style={{ ...
-5
votes
0
answers
87
views
removing inline javascript failing [closed]
A rails 7.1 view file runs with in-line javascript as follows.
<script>
var autoComplete = (function(){
[ ... contents of .js file. see below]
</script>
<%= javascript_tag do %>
...
0
votes
0
answers
48
views
Calculate mouse position in rotated div [duplicate]
How to calc mouse position (ClientX, ClientY) in rotated and scaled DIV?
HTML structure:
SCALED DIV - transform: scale(0.8);
ROTATED DIV - transform: rotate(340deg);
ROTATED TARGET DIV - transform: ...
-3
votes
0
answers
37
views
How to enqueue CSS and JS properly in a WordPress theme? [closed]
I’m building a custom WordPress theme and currently adding CSS and JS directly in header.php.
I read that wp_enqueue_style and wp_enqueue_script should be used instead.
Can someone explain the correct ...
0
votes
1
answer
69
views
Javascript Import Variables
so I have an HTML page, a linked Javascript(jQuery actually) file that has functions linked to clicks, etc. Then I want to add Regular Expressions to check user input.
I want to maintain all JS ...
-3
votes
1
answer
90
views
Why does clicking the button cause a white screen, and how can I fix this? [closed]
I'm building a portfolio website with React + TypeScript and Redux. I have a chat assistant component that should only appear after a user clicks an "Start" button (which sets app.ready to ...
-3
votes
1
answer
107
views
JavaScript - Why this multiplier closure function works? [duplicate]
I´m following the "Eloquent JavaScript" 4th edition book, and there is the following chunk of code:
function multiplier(factor) {
return number => number * factor;
}
let twice = ...