Skip to content

Canvas API implementation

I recently started to learn a bit about how javascript work under the hood, and came to know that (in the context of chrome) v8 engine and web APIs are different. Here’s some questions I have regarding the canvas API specifically: Why do we need to use getImageData() every time we want to access the pix…

Dropdown on click doing nothing

I am just starting JS, so this may be a stupid question. I want to make a dropdown, where if you pick one option the related paragraph would be visible. I didn’t really know how to start this so I created the cars function to make the “e38value” paragraph visible when clicking the e38 button…

Define global variables to use inside components

I have a Laravel 8 project, with vue-sweetalert2 installed. I’d like to define the Toast behaviour once, and then call it inside my components. By now I have this code: /js/components/Mypage.vue This works fine, of course, but as you can see Toast is defined inside the method, and I cannot re-use it som…

How to filter array with multiple conditions in Vuejs?

I am trying to achieve functionality like, Initially the array will be loaded with the help of v-for. At the top I have two options called search-bar and dropdown. Where With the help of those I am trying to filler the array. Where with search-bar, I want to filter array values. With dropdown, I want to filte…