« first day (4114 days earlier)      last day (819 days later) » 

2:04 AM
posted on January 20, 2022 by Krishna Govind

Hi everyone! We've just released Chrome Beta 98 (98.0.4758.63) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 
 
4 hours later…
user17972729
5:54 AM
Cool! First time in a SO Chat room!
 
@vihefab392 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.
 
 
4 hours later…
9:51 AM
Hi everyone, Request you to help me with this if possible
https://stackoverflow.com/questions/70784008/flipper-plugins-not-working-with-react-native-app
 
 
3 hours later…
12:22 PM
Hi hi
 
@CostlyDeveloper 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.
 
12:51 PM
hey
I'm wondering if this is even possible in Angular. I set up a HttpInterceptor to add a new header "cookie" to my app's requests. It seems on testing that you can't add headers with name "cookie". As adding say for example "test" header works in this case.

When I debug the interceptor at runtime, I see the "cookie" header being added to the cloned request. But checking that request in network tab has no "cookie" header

Is this a browser security thing maybe? Where you can't set the cookie header from client.
const authReq = request.clone({
    setHeaders: {
      cookie: "myCustomCookie=123456",
    },
    withCredentials: true,
  });
* I see no myCustomCookie cookie inside the Cookie header
 
 
6 hours later…
7:10 PM
Looking at this again, I found that its probably a better idea for the backend service response to set the cookie via Set-Cookie header
Although its probably best to pass this value in a JWT instead as part of the Authentication header
 
 
1 hour later…
8:17 PM
Ive got a condition that styles based upon a number percentage, and a class that I am trying to add based on that percent
                    if(monAttPerc > 50.00 && monAttPerc <= 100.00){
                        $("under_txtMPerc").addClass("green");
                    }
                    if(monAttPerc > 10.00 && monAttPerc <= 50.00){
                        $("under_txtMPerc").addClass("yellow");
                    }
                    if(monAttPerc <= 10.00){
                        $("under_txtMPerc").addClass("red");
                    }
 .green {
     background-color: #66b266 !important;
}
 .red {
     background-color: #ff6666 !important;
}
 .yellow {
     background-color: #ffff66 !important;
}
But nothing happens? monAttPerc is 0
Hahahaha I am such an idiot
forgot to tag the div properly
 
 
1 hour later…
9:31 PM
also, jquery in 2022?!
4
 
10:19 PM
Well heck
I need help doing something naughty
I'm trying to add a function to Array.prototype but I can't figure out how to access the Array's values within the function
 
hmm
whatdo you have so far
 
70
A: adding custom functions into Array.prototype

csellsWhile the potential for clashing with other bits o' code the override a function on a prototype is still a risk, if you want to do this with modern versions of JavaScript, you can use the Object.defineProperty method, turning off the enumerable bit, e.g. // functional sort Object.defineProperty(...

 
10:39 PM
Sigh. I just needed to define it as a function instead of an arrow function
Thanks @JBis
Wish I had a better grasp of the differences. It's easy to get in the habit of using arrow functions everywhere but I honestly don't even see the benefit
 
the purpose of arrow functions is to alter how this works
it is often used to reduce the amount of keystrokes needed to write it instead
which... isn't a problem until it is
 
Defined as a function, this references the array as I'd expect it to, therefore this.values() works as expected. With the arrow function, I couldn't even seem to change this by using .bind()
While using the arrow function, this was always the value of this when the function was defined, despite my best efforts to change that
 

« first day (4114 days earlier)      last day (819 days later) »