« first day (4372 days earlier)      last day (562 days later) » 

12:28 AM
posted on October 04, 2022 by Daniel Gagnon

The Beta channel is being updated to 107.0.5304.22 (Platform version: 15117.27.0 / 15117.28.0) for most ChromeOS devices. This build contains a number of bug fixes and security updates and will be rolled out over the next couple days. If you find new issues, please let us know one of the following ways File a bugVisit our ChromeOS communitiesGeneral: Chromebook Hel

 
1:22 AM
posted on October 05, 2022 by Giuliana Pritchard

LTS-102 has been updated in the LTS channel to 102.0.5005.182 (Platform Version: 14695.135.0) for most ChromeOS devices. Want to know more about Long-term Support? Click here. This update contains multiple Security fixes, including: 1340253  Critical CVE-2022-3038 Use after free in Network Service. 1051198  High CVE-2022-3044: Inap

 
 
8 hours later…
9:10 AM
Is there any way to make an iframe that has a script that does "window.parent.postMessage" wait until parent DOMContentLoad?
The event fired from the iframe disappears sometimes right now.
(As the parent event listeners has not yet been loaded).
 
9:27 AM
you can send messages to the other iframe?
(not that I like this setup...)
1. have iframe listen
2. on domcontent loaded in parent - send message to iframe
3. iframe acts
 
@KarelG shouldn't the iframe initiate the "conversation" since it is loaded after the parent? Though, I guess an iframe could load before its parent does
@Warcaith If an iframe can access window.parent.postMessage why does it need to use it? it's clearly same-domain, so unless I'm missing something, this seems an odd way for the iframe to communicate with its parent
 
It's not same domain at all, using this as I'm getting cross-origin problems otherwise.
Do you think this is a useable solution? Like, "request" something from iframe via parent object and then do as you said @KarelG, react on that message and send a response?
@JaromandaX Btw, window.parent.postMessage works with cross-origin issues
 
@Warcaith ahh yes of course - wasn't thinking straight :p
 
@JaromandaX However, I can't get this working, the iframe isn't getting the message sent from parent object.
Oh, I'm using <object> instead of <iframe>. Could that be the issue?
Isn't <object> working with event listeners?
 
9:43 AM
that's a tag I did not have seen for ........ 10 years?
I need to check that lol
 
iframe is perhaps better to use?
 
@KarelG What about <embed> !
 
Oh, didn't think of <embed>. I'll try that :D
 
@Warcaith no, I didn't mean to suggest using embed!! I was asking KarelG how long since he'd seen <embed> - sorry for the confusion
 
Oh, haha... :D
iframe is the most used one, right?
For this purpose
 
9:55 AM
@Warcaith definitely
as an aside, I was on a web site the other day that used <marquee> ... oh the memories
 
What does even marquee mean?
Ohh
Like a mark?
Or something
 
no ... scrolling text - dear lord, you must be young :p
 
Haha born 1996, so not that young... but young enough to not know what <marquee> is I guess
 
Haha damn
Cool
 
9:58 AM
the nested <marquee> is a sight to behold!
 
@JaromandaX I know what my problem was now. <iframe> loads AFTER the parent objects, but if you use <object>, this isn't always the case.
 
10:14 AM
@JaromandaX 10 years ago = me doing bachelor CS. I have seen that embed thing somewhere at my prev work, so at least > 2 years ago :D
besides marquee, there's <blink> (often combined with coloring ...)
now back to that question of yours ...
really not sure if <object> supports the messaging api ....
 
Aaah alright
Btw
Is there any good way to check if an iframe is loaded correctly (in case the URL/src points to something that does not exists, which can happen in my case)
 
10:30 AM
let it send a message :P
an alternative may be ... checking its readyState.
(just look around, there are likely multiple approaches)
oh worth to note: listening to load event (i've seen people suggesting it on SO) is not a solid approach. I 've had cases that it did not fire while the frame is there!
 
Okay, but what if I have this scenario:

Parent is waiting for multiple iframe children to send one message each. If parent has received the messages from the children, send a new message up to the next parent.

(I got a hierarchy of iframes. Don't ask why, it's for a special purpose).

How should I handle if I don't receive a message from one of the children? A simple timeout? Is there any more reliable way checking if one of the children is a non-valid iframe (with a broken "src")?
 
 
1 hour later…
11:51 AM
Uhm, weird.
 
@Warcaith 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.
 
It always stops at "999"
 
1 message moved to Trash can
 
Even if I broadcast a lot more than 1000 events
Why can I only console.log a maximum of 1000 events with this code?
let counter = 0
window.addEventListener("message", (event) => {
console.log(counter)
counter++
})
It's like I only can emit 1000 events and then it stops.
 
how are you posting your message?
it should be > 1000 without problems
 
12:03 PM
Aaah.. I can't load more than 1000 iframes, that's the thing.
Just stresstesting some things.
 
12:14 PM
keh
 
So I'm in a project which is run in a iPad app (through webkit), which I haven't created. The have in some way managed to create a structure where I can set window.fooBar to a function, and when something happens in the app (bluetooth comm) my function will be called.
Now I don't have access to this iPad nor the bluetooth thing. Is there a way for me to create a simple simulator (like a crome plugin or something) that can call this fooBar function?
 
12:39 PM
Does the question even makes sense?
 
12:53 PM
Oh, I can just set it... ok then.
 
 
3 hours later…
4:06 PM
Hello, I'm trying to select all links inside a div I made that ligne : const linking = document.querySelector('.menu p a');
 
@MIBE 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.
 
it selects only the first one
I don't know how to select all the links inside the div (.menu=class) paragraphe
could someone explain it to me please
 
!!mdn queryselectorall
 
!!mdn queryselector
 
one grabs the first match, the other grabs them all
 
@MIBE your function selects only one matching element. There's a ...All() that picks up all of them
 
ok it's just simply stupid :D
thank you very much I was going in circle
and it doesn't work with Document.querySelectorAll(), it select nothing at all :-\
 
@MIBE you said that you could select one of them. So if you only changed the .querySelector to .querySelectorAll then it should work ;O
 
I'm trying to select all the links inside the menu, to close the menu with an adventlistner when clicked on
without the "all" after querySelector it work with the first link but not the two other, with the all it work with none of them
my selector code may be wrong and it was just luck ?
(I'm not good with javascript)
 
4:25 PM
well
 
I still see this
const linking = document.querySelector('.menu p a');
 
in one case, you're given an element
 
expected this tbh
const linking = document.querySelectorAll('.menu p a');
 
in another you're given a collection
 
then loop through linking
 
4:28 PM
I don't understand (sorry)
I tried to replace const linking = document.querySelector('.menu p a'); with const linking = document.querySelectorAll('.menu p a'); but it doesn't work
 
this
linking.addEventListener('click', () => {
  toggler.classList.remove('active');
  menu.classList.remove('active');
})
only works if the linking is an Element (<a> , <div> , <li> ) element
what you got with .querySelectorAll is that you have a list of Elements
meaning "<a>, <a>, <a>"
 
oh ok
 
so you need to loop through it
use Array.from(linking).forEach(element => element.addEventListener....... )
 
i understand know but I don't know how to :D
 
that's an excuse to learn
 
4:33 PM
(thank you for the explanation I was looking at the wrong part)
 
best to check what both functionalities does, learn what it does :)
MDN is a good place for that
|| mdn Array.from
 
|| mdn Array.prototype.forEach
 
okay it works and I learned something today
I feel like a deserve myself a drink :D
thank you very much again
and again
bye and thank you again :)
 
 
1 hour later…
6:08 PM
how do you get eslint that wants single quote , not to break with "Côte d'Ivoire"
 
6:30 PM
got it, delete the eslint rule
 
7:01 PM
wdym
just use `
 
 
3 hours later…
10:00 PM
 

« first day (4372 days earlier)      last day (562 days later) »