Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
Advice
0 votes
0 replies
51 views

How do we load ML5 as an ES6 Module? I have tried: import ml5 from "https://unpkg.com/[email protected]/dist/ml5.min.js"; // but no default export import * as ml5 from "https://unpkg.com/ml5@1....
Dan Zen's user avatar
  • 555
-1 votes
1 answer
94 views

I was brushing up on Array for an implementation and I stumbled on this discovery, I expected the following code to give me an array filled with the number 42: Array(3).map(x => 42) But instead, ...
-1 votes
1 answer
74 views

I'm new to JavaScript and I'm trying to achieve the logic I have commented in the constructor method of the base class export default class Building { constructor(sqft) { this._sqft = sqft; ...
-4 votes
1 answer
115 views

I'm learning JavaScript and practicing merging arrays. Here's one of the methods I wrote using two for loops: const arr1 = [4, 5, 7, 9, 8]; const arr2 = [-1, -2, 0, 12]; const arr3 = []; for (let i = ...
2 votes
1 answer
90 views

I’m experimenting with the ECMAScript proposal for ShadowRealm and ran into some deeply unintuitive behavior around object identity, function bindings, and prototype inheritance across realms. ...
-4 votes
1 answer
130 views

I'm getting syntax errors when trying to modularize a Google Apps Script HTML project. The issue appears to be related to how the HTML service processes included files as templates rather than raw ...
-1 votes
2 answers
123 views

I am using ixjs/AyncIterable (pull-model). The simplest code I need to write at the end, to initiate the stream processing is: for await (let i of asyncIterable); But eslint does not like this: 'i' ...
3 votes
1 answer
97 views

I modify the handler object after proxy's creation, and obtain intended result. But nowhere in mdn document such pattern, can i rely on this pattern to work consistently across browser/in future? ...
0 votes
2 answers
198 views

In an existing web app written in Vue and PHP, we are trying to add a Micro Frontend using Module Federation. After we configured the app, I found out that the watch command wasn't working correctly. ...
1 vote
2 answers
111 views

I wish to create a class which extends EventTarget, allowing addEventListener() and dispatchEvent() to be invoked on it. Logically, my class wants to be a singleton; if a page accidentally ...
1 vote
0 answers
65 views

I am writing documentation for some classes written using the ES6 class syntax. I have some classes which inherit their constructor from their parent class, as below: /** * @class */ class Parent { ...
2 votes
2 answers
134 views

I have a Firebase Functions project that has "type" set to "module" in package.json so that I can use ES6 syntax. Some of the files import data from another json file with a line ...
-3 votes
1 answer
79 views

my codes console results Here are my React codes. I know that if you write a function with a parenthesis, it will be called immediately (in this case, it will be called when elements render, I have ...
-1 votes
1 answer
324 views

I'm working on a figma plugin where in I need to use the components which are in published library assets. I know I should be using figma.importComponentByKeyAsync() of figma plugin API, but I m not ...
0 votes
0 answers
133 views

In a webapp we are trying to solve an Open Redirect vulnerability. The code is like this: window.location.href = DOMPurify.sanitize(data.href); Which apparently is vulnerable. One recommended solution ...

15 30 50 per page
1
2 3 4 5
...
1996

AltStyle によって変換されたページ (->オリジナル) /