« first day (3987 days earlier)      last day (1183 days later) » 

04:26
I've an issue in using two tradingview widgets in one page With (nuxtJS vue)
https://stackoverflow.com/questions/69187078/how-to-use-two-tradingview-widgets-in-one-nuxt-js-page-vuejs

Anyone can help ?
@MehdiRafiee 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.
 
7 hours later…
11:01
Hi guys, How could I detect a click inside a textarea, when there are some HTML tags inside the textarea?
@Hamid 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.
11:33
Why here setTimeout has no effect? It's not waiting for 5 secs.
    Promise.resolve("some")
  .then(function (string) {
    return new Promise(function (resolve, reject) {
      setTimeout(function () {
        string += "thing";
        console.log("hi");
        resolve(string);
      }, 5);
    });
  })
  .then(function (string) {
    console.log(string); // <-- Logs 'something' to the console
  });
@DamodaraSahu Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
12:04
Sorry, ignore. It's my mistake.
12:23
Well first off, that is 5 milliseconds not 5 seconds.
5000 would be the correct int
12:42
Anybody know why I'm seeing a -0.5 value when using tickpositions in highcharts? Here's the fiddle jsfiddle.net/n7q5sogu
13:24
@SagarV where?
I hovered on the data points, did not get any -0.5
same for labels
@KarelG Not in data points. The tickposition of in is 0. However there's a space below it.
No values are -0.5 also the min is set to 0.
13:43
any idea on it?
Mornin
13:57
@SagarV it is not 100% clear, your issue :)
but since you're using tickpositions and categories, should you not use the tickmarkPlacement option?
@KarelG for example, when I give category 'In' and tickposition 0, I'm expecting it to appear along with x axis. However there's a gap you can see. 0 is starting after a space
I remember I have to use it ... lemme check doc
did you have tried to use 'on' ?
yes. I tried just now.
Still the issue
Here's a screenshot of the actual issue i.sstatic.net/ylzFl.png
on first hand, idk why
yAxis: {
    tickPositions: [0, 1, 2,3,4],
    categories: ['In', 'Us', 'ca', 'jp', 'sl'],
    gridLineWidth: 1,
    min: 0,
    max: 4,
    type: 'categories', // just tried by adding this one ...
},
it's still not working
14:11
I mean ... that 0.5 must be coming from somewhere.
even if you do it by categories only (so without tickposition), you get the same result
You have me intrigued
14:23
Whenever I get a promise object from .then(), I usually get Promise {<pending>}. But when I inspect the state, I find fulfillled. In case, I create a promise from constructor function, if promise object is Promise{<pending>} then state is pending, If promise object is Promise{<fulfilled>} then state is fulfilled.
Why it shows <pending> when state is fulfilled, when I work with .then()?
because it's always pending until it's not
the console can trick you, if you're relying on it to determing whether or not it's pending
As an example, if you do this:
var foo = {foo: "bar"};
console.log(foo);
foo.foo = "foobar";
your console.log will show foobar, not bar
because that's the state of the object when you look at it in the console
14:44
it's generally not useful to determine whether or not a promise is resolved.
in terms of logic/code
hehe
that reminds me.. I startet playing around with Node-RED
also visual programming, maybe a bit more programmy with it's function blocks and all.. but all in all, a nice tool
15:10
Hey,

I am querying a list item id to a custom url like http://server/site/sitepages/MyCustomPage.aspx?MyCustomParameter=[MyCustomValue]. I need to get the [MyCustomValue] from the current window.location.href
What would be the best way to go about so
!!mdn urlsearchparams
@BeerusDev If you have a concrete value in this URL and the URL is in location, then new URLSearchParams(location.search).get("MyCustomParameter").
@KevinB already gone to the catacombs :D
I have a script sending an email to someone who was assigned a task, and before it sends it it appends the task item id to the [MyCustomValue] parameter, so I can use it to filter the table to only show that user the item that they were just assigned so the value is dynamic
15:16
@SebastianSimon I am that dude that wants that you are using .has before accessing it
Jul 22 at 21:57, by Suisse
hi I learn javascript - since 16 years. I am a beginner.
@KarelG Can’t really see why… .get returns null if the parameter doesn’t exist. const param = new URLSearchParams(location.search).get("param"); if(param === null){ throw new Error; } doTheThing(param); vs. const params = new URLSearchParams(location.search); if(!params.has("param")){ throw new Error; } doTheThing(params.get("param"));. Assigning a default value with ?? is even easier with just .get.
15:32
Wait nvm
has jQuery a feature that if you have a collection of jquery objects, and upon calling .val() that it returns the first input that has value in it
like $('input') gives 5 input elements if there are five of it. The third one has 'foobar', so I want a convenient means to get it
$('input').val() targets the first element
at the beginning of my $(document).ready(function(){}), I have the following
    const paramId = new URLSearchParams(window.location.search);
    paramId.get('MyCustomParameter');

    console.log(paramId);
aha filter
the url ends in Page.aspx?MyCustomParameter=56
and when I check the console log for paramId
it shows an object URLSearchParams
but its empty?
used this -> api.jquery.com/filter/#filter-elements , so got what I need
@SebastianSimon lol throwing an error
15:43
@BeerusDev Yes, logging just the URLSearchParams object itself will make it appear as an empty object in the console, unfortunately, but it’s not actually empty. You can use new Map(new URLSearchParams(location.search).entries()) to make all entries visible.
problem is that you van have param param0=&param1=lorem
does this one not give undefined at 'param0'?
I expect empty string
It will ever only be one param. unless it stores them
So will I be able to pass paramId into my table filter?
@KarelG Well, it’s a placeholder for actual error handling. That shouldn’t really matter because I only demonstrate using .has vs. not using it.
@KarelG For the search string ?a=&b, both a and b are treated as empty strings.
😐
in that case. .has is not required then :)
🤔
|| mdn URLSearchParams
15:47
> A USVString if the given search parameter is found; otherwise, null.
might have mis-interpret it
:o
@BeerusDev paramId.get('MyCustomParameter') is the value.
console.log(paramId.get("MyCustomParameter")). The statement paramId.get("MyCustomParameter"); itself doesn’t do anything.
Number(paramId.get("MyCustomParameter")) if you need 56 as a number.
I can just pass it as a string
But perfect
Thanks guys
 
1 hour later…
17:01
Idk why this isn't working, but don't conditions work in a hierarchical order
17:59
@KarelG I've no idea where it comes from. The code doesn't have any such statement. No idea
18:32
posted on September 15, 2021 by Harry Souders

Hi, everyone! We've released Chrome Beta 95 (95.0.4638.8) 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. Harry Souders Google Chrome

19:05
Hello. This code supposedly works: https://codepen.io/voxinhumanis/pen/qBjVdwv
**Headphones warning**. But only if it works. And if it works, why is it working for you and not for me? That's the question I'm trying to answer. I'm in Chrome. Somebody else tried the same thing and it worked for them, so what's up?
19:33
"Supposedly works"
@JohnnyApplesauce What is supposed to happen? After interacting with the page, I hear a continuous beep. Interacting with the page (e.g. clicking) is required for audio to play.
19:54
is there a way to add to an existing object in a foreach without using push? I dont want to use push because it makes it into an array.
20:30
@LuDevGon push doesn’t “make” things into an Array. What do you mean by “add to”?
I have an object of Cars and inside there are properties of year, models. what i want is to loop through cars and extract the models into their own object. but at the moment its just overwriting the data every loop
i have for(let key in Cars){}
var value = Cars[key]; vm. models = value.Models;
Every time it loops i would like it to add the models to vm.Models object.
 
2 hours later…
22:44
posted on September 15, 2021 by Srinivas Sista

 The Beta channel has been updated to 94.0.4606.50 for Windows, and linux. Mac update coming soon. A full list of changes in this build is available in the log. Interested in switching release channels?  Find out how here. 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.

23:20
posted on September 15, 2021 by Krishna Govind

Hi everyone! We've just released Chrome Beta 94 (94.0.4606.50) 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


« first day (3987 days earlier)      last day (1183 days later) »