« first day (5030 days earlier)      last day (140 days later) » 

12:30
@1.21gigawatts around 6 most of the time, depending on what the function does. Sometimes I combine options with params as well, or I just use an options object for everything. If I can though, I always try to use params instead
 
2 hours later…
15:07
ive used something similar to this in the past
                                                                                console.clear();
        fn(1,2,3);        //  {a: 1, b: 2, c: 3}
        fn({a:99});       //  {a: 99}

        function fn(a,b,c){

              var params    = parse(fn,[...arguments]);
              console.log('params',params);

        }//fn

        function parse(fn,args){
                                                                                console.log(arguments.callee.caller);
                                                                                console.log(arguments.callee.caller.
the typeof check to see what form of arguments have been passed can be changed to suit, either generic or specific to function
or some variation of
        fn(true,'xyz',()=>'hello',99,101);

        function fn(a,b,c){

              var callback    = arg(arguments,'function');
              console.log(callback);

              var index       = arg(arguments,'number',1);
              console.log(index);

        }//fn


        function arg(args,type,index=0){

              var c   = 0;
              var n   = args.length;
              for(var i=0;i<n;i++){

                    if(typeof args[i]==type){
                          if(c==index){
15:50
just for muse
                                                                                console.clear();

        var map   = new WeakMap();

        var a   = document.createElement('div');
        map.set(a,()=>'hello');

        console.log(map.get(a)());

  //:

        var mem     = [];
        mem.rnd     = ()=>Math.random();
        mem.add     = (node,fn,index)=>(index=mem.rnd(),mem.push({index,node,fn}),index);
        mem.rem     = node=>(i=mem.findIndex(o=>o.node===node)) ?? mem.splice(i,1,0);
16:09
Nullish coalescing operator (??)
The nullish coalescing (??) operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
therefore
        mem.rem     = (node,i)=>(i=mem.findIndex(o=>o.node===node),mem.splice(i,1));
 
2 hours later…
17:48
@MohamedRaza 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.
 
1 hour later…
18:53
Time for a biyearly room 17 visit
 
1 hour later…
20:03
posted on July 24, 2024 by Ben Mason

The Chrome team is excited to announce the promotion of Chrome 128 to the Beta channel for Windows, Mac and Linux. Chrome 128.0.6613.7 contains our usual under-the-hood performance and stability tweaks, but there are also some cool new features to explore - please head to the Chromium blog to learn more! A partial list of changes is available in the Git log. Interested in switching release chan

posted on July 24, 2024 by Ben Mason

The Dev channel has been updated to 128.0.6613.7 for Windows, Mac and Linux. A partial list of changes is available in the Git log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Prudhvi Bommana Google Chrome

 
2 hours later…
21:52
is there a domcontentloaded attribute on html page body?
I can write the following and auto complete fills in onload and on* but doesn't autocomplete domcontentloaded
<body onload="console.log('page load')">
There is no code complete for:
<body ondomcontentloaded="console.log('page load')">
page dom content loaded
iframe onload
 page body tag onload
22:14
Should HTML pages have a footer section? They have a head, body but no footer
it would seem to make sense to have this:
<head></head>
<body></body>
<feet></feet>
does page onload occur after domcontentload?
welp page load has been what i was looking for:
The load event is fired when the whole page has loaded, including all dependent resources such as stylesheets, scripts, iframes, and images, except those that are loaded lazily. This is in contrast to DOMContentLoaded, which is fired as soon as the page DOM has been loaded, without waiting for resources to finish loading.
Is there an alternative markdown for block quotes than >?
23:05
I've noticed in typescript or javascript that I can overwrite a method in a sub class with or without the override key word. it still seems to work. although sometimes it has typescript errors if the signature is not the same
23:39
posted on July 24, 2024 by Ben Mason

Hi everyone! We've just released Chrome Beta 128 (128.0.6613.6) 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. Harry Souders Google Chrome


« first day (5030 days earlier)      last day (140 days later) »