« first day (3694 days earlier)      last day (1237 days later) » 

12:09 AM
async meth() {
    try {
         return faultymethodAsync();
    } catch (e) {
         // debugger;
    }
}
Will the catch trigger if the faultyMethod fails?
 
 
2 hours later…
1:50 AM
hi all does any one have idea to test fb sharing preview for localhost developers.facebook.com/tools/debug?
 
 
i would like to check the og:image whthr it displays or not neforre pushing to PRD i have to test in local , is there any way i can test the website
 
 
1 hour later…
3:15 AM
posted on November 26, 2020 by Bindu Suvarna

 Hi, everyone! We've released Chrome Beta 88 (88.0.4324.19) for iOS: it'll become available on App Store in next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Bindu Suvarna Google Chrome

 
 
4 hours later…
7:41 AM
I have a stackoverflow question from a month ago and it still hasn't got any answers, can I post it here for some attention?
 
@Manstie Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
8:25 AM
hello guys, can you help me on this question? Can you give me some ideas? stackoverflow.com/questions/65012502/…
 
@FurkanFındıkoğlu Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
9:13 AM
Hi guys, I am facing an issue in downloading multiple image/video files using <a> tag in javascript, a.click() is open the download popup for asking to save or cancel the download if I give save/cancel after 10-15 ms is downloading the current file and stopped download popup is not coming for the next image/video file.
This issue only occurred in iphone safari browser and it is working android
 
@SarthakAgarwal Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
after searching on the internet I found that a.click() is not blocking the javascript code in safari iPhone
 
9:35 AM
Hi folks. I'm sorry if my comment is not related to this chat. A question: what should I do if my question doesn't get any answers? I read help and did what it says. Can I delete and repost?
 
@VahidPouyafar Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Off course my Question code is JavaScript: stackoverflow.com/q/64833727/14637348
 
9:57 AM
@VahidPouyafar So you want to be able to drag to scroll your page from the slider?
 
@BenFortune Yes exactly
 
pointer-events: none would obviously do that, but would stop your slider from working. Maybe you could check which direction they are swiping and call preventDefault on your slider if it's up/down?
0
Q: How to detect swipe in JavaScript?

MMonI want to make simple game in js. But for that I want to user play by swiping finger/cursor on the screen, up / down / right / left. There is a simple way to make that?

Obviously you'd need to take into account slight diagonal swipes as it's never going to be a straight swipe
 
Might also work with touch-action: pan-y (see mdn), tldr it should tell the browser to only handle vertical moves and let the horizontal moves be handled in code. But not sure if it actually works without annoying glitches, Ben's idea is probably better an more flexible in many ways.
 
10:15 AM
@BenFortune, @makadev Thank you very much I'll try them to see if they work :)
@BenFortune I've not tried your suggestion yet but my problem is not detect swiping direction. I used preventDefault to stop the browser handling the touch and handle it myself in the code. but the problem is I have to use preventDefault in "touchstart" event handler but to figure out which direction the user is swiping I need to wait for "touchmove" event after which I'm not in the scope of "touchstart" event hanlder so can not use preventDefault anymore!
 
You should still be able to call it on touchmove
25
Q: How to prevent default handling of touch events?

johndodoI am trying to do something similar to what embedded Google maps do. My component should ignore single touch (allowing user to scroll page) and pinch outside of itself (allowing user to zoom page), but should react to double touch (allowing user to navigate inside the component) and disallow any ...

Have a look at the accepted answer, apparently chrome does some fucky hijacking on the event
 
10:31 AM
hi
I got a task to create a function which takes an object and clone it, but without cloning deep properties
output should be
console.log(cloneObj === getClone(obj)); // this should return false
console.log(cloneObj == getClone(obj)); // this should return true
I tried this
var obj = {
    'foo': 'bar'
};
var cloneObj = getCloneObj(obj);

function getCloneObj(p) {
    var temp = Object.assign({}, p);
    return temp;
}
console.log(cloneObj == getCloneObj(obj))
it returns false
 
that's always going to return false
that's not how you do object comparisons
 
but this is the question :(
 
@BenFortune It's weird. After you said you can still call it in "touchmove" It worked!! I've already read the question you told but didn't find it helpful
!!
 
10:53 AM
@AbhishekPandey for understanding, is this a beginners course or advanced?
 
11:08 AM
advanced
it's an interview question though
practicing it
 
Meh.. interview questions are hard to gauge, might be simply wrong / trickquestion. See "loose equality" operator "==", "If the operands are both objects, return true only if both operands reference the same object." which is same as strict equality "===".
Your clone function is ok, it creates a shallow copy (thats what Object.Assign or the spread operator ... does).
So console.log(cloneObj == getCloneObj(obj)) <- this is wrong
 
You should recommend in your response how to do object equality properly, using Object.is, recursive checking or even the JSON.parse(JSON.stringify(... hack
@VahidPouyafar nice 😀
 
11:29 AM
@BenFortune I'm still quite struggling. the problem is I use preventDefault inside in if block inside the "touchmove" event handler. If I call preventDefault directly inside "touchmove" event handler it works but because it's inside an if block although condition evaluates to true it dosen't work
I'm confused
it works in touch mode in chrome desktop but not on android chrome
Oh my gooooooooood. you're right It's just chrom
on firefox it works
 
haha, is it the passive listener?
 
yes
I added passive: false
but still chrome sucks!
 
It really does, and it gets worse with every update
 
11:45 AM
@BenFortune You opened my eyes ! I'm closer to my answer
 
12:00 PM
Firefox <3 :P
 
@Riches Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
user12582392
hey guys, i'm implementing node 14, using import
 
user12582392
seems the way to import functions is either
 
user12582392
import { function } from "./filename.js";
import path from "path";
import { fileURLToPath } from 'url';
 
user12582392
im new to node, any ide why that difference?
 
12:06 PM
that only works for ES modules, see nodejs.org/docs/latest-v14.x/api/esm.html
Unless you have something transpiling your code beforehand
 
user12582392
You mean that import {function} only works cause it was export { function }, sort of?
 
user12582392
will take a look though i'm asking cause my head is next to explode :-(
 
user12582392
guess everyone's is
 
12:25 PM
@makadev thanks man
 
 
3 hours later…
3:46 PM
anyone's company is hiring for javascript developers? I am looking for an opportunity.
 
@HrishikeshKale Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
3:58 PM
I am building cef app for my web app so UI code is reused there. But the "Copy to clipboard" function is not working on cef app which is working in browser instead. I found that window.navigator.clipboard is undefined in cef. Could someone please help?
@HrishikeshKale US or India?
@HrishikeshKale I work at Adobe India and can refer you here if you want.
 
4:55 PM
@RahulJain India, yes you can refer me.
 
@RahulJain Are you serving it over https?
Lots of chrome APIs require a secure context
 
hey
I have this component imported from node_modules, but it's not showing up in sources of Chrome Dev tools
any ideas how you can find the imported component to set a breakpoint?
 
@BrianJ only on localhost you can debug component file, by using ctrl + p and searching your file there.
 
+ 1 I see, I was trying with ctrl + 0 and it didn't show but not it's there
 
@BrianJ umm. have you tried ctrl + p?
 
5:03 PM
yeah its showing with ctrl+p
:)
 
@BrianJ awesome, you owe one coffee :P
 
 
@BenFortune both http and https
@HrishikeshKale Ok please give me your email-id. Also, I believe you have pretty good profile. You should be flooded by so many recruiters' messages on LinkedIn
 
@RahulJain haha, can I get your LinkedIn profile? I'll connect you there.
 
5:31 PM
.
 
@YSF_AD Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Hello everyone
 
@HrishikeshKale Yeah, also, I know a Microsoft recruiter who has been asking me for a few days, will let her know about you.
 
I am in doubt how to fetch multiple 'GET' requests from useEffect
useEffect hook and fetch
This is my API - https://eonet.sci.gsfc.nasa.gov/api/v2.1/categories

And I want to fetch all categories , and then fetch events from`link` from each object
What's the solution for that ?
 

« first day (3694 days earlier)      last day (1237 days later) »