Skip to content
Advertisement

Tag: javascript

Changing an Input value in Blazor by javascript doesn’t change it’s binded property value

I’m building a website using app.net core 3.1 with blazor. In one of my components I have : <input @bind=”Message” type=”text” id=”input-message”/> Message is just a string property. and I have javascript: document.getElementById(‘input-message’).value = ‘some text’; The problem is after running the above js, <input> value changes but Message value doesn’t, and of course if I type or paste something

Importing SVG in NextJS

I am trying to import an svg within a NextJS project, everytime I get this error I have tried using next-images and also svgr. I will paste my About.js code below, it would be excellent if someone could let me know what I have been doing wrong. Answer Using next-images and adding the correct module exports allowed me to use

Is there a way to integrate stencil components into frameworks locally without publishing to NPM?

I am currently testing stencil js. For now I want to write stencil components and include them within a VUE/React project. The official website of stencil already shows how to integrate them within a framework (https://stenciljs.com/docs/overview). But they assume that your own stencil component library has already been published to npm. Is there a way to integrate stencil components locally

Can’t manage to hide window using if on javascript

First of all a little background so that you guys don´t respond so harshly, I´ve been learning code for the past month and a half. I´ve been having trouble hiding a window that shows up if your browser language is not in English. I know there are other ways to go around it but I would like to know why

Javascript Fetch is Slow (60ms vs 3ms)

Running Javascript fetch takes about 60ms per call on my machine. Compared to Python requests at 3ms, this is much slower. Questions Why is fetch so much slower? Is there any way to speed it up? I am OK with answers that require me to reconfigure my browser. Experiment These are the details of my experiment. System Browser: Firefox 74.0

Using v-tooltip on custom (non native) component

I have a custom component which is being used application wide. But, in some place I want to show tooltip on hover on this component, according to vuetify docs this should work but it doesn’t because <custom-component /> is not a native component. And to have this functionality for native component a .native modifier is to be used. Example: @click.native=”someMethod”

Awaiting an async function when using Mongodb in node.js

I am trying to retrieve all documents from a MongoDB cluster. I’ve been searching online and using the async/await keywords and have wrote the following code From my understanding of the async/await pattern theconsole.log(questions) line should only be hit after the return inside GetQuestions is hit, however that is not the case. Answer You should return a Promise with the

Advertisement