ContentScript Advance

102 views
Skip to first unread message

Sabbir Hossain

unread,
Jan 21, 2024, 11:05:01 AM1/21/24
to Chromium Extensions

Hi,

How are you everyone, I hope you are doing well. I need some help.

I'm creating a chrome extension that will just extract data from the webpage and shows on action popup.


 I think it will be simple to interact with normal DOM. But currently, i'm working on ticketmaster website, here is my GitHub repository link (click-master) (I have already added a preview video what I have to do)

From the below photo, all element is path, circle tag and SVG,, so firstly I have to listen user click the event that I already did.

1.png

/** listen event */

    on("click", "#map-container", (event) => {

      console.log("event: ", event.target);

    });

I'm using (delegated-events) npm package to delegated event

. But it's not able to work with these element link when someone click 206 or any of box then it's not listen,

event I'm fully confused how can I read all event and to some task like when user click seat 1 then I have to auto click 2-3-4-5-6 I mean based on max ticket.


Can anyone help me to give some idea about this??

how can I do this?

Oliver Dunk

unread,
Jan 23, 2024, 12:06:55 PM1/23/24
to Sabbir Hossain, Chromium Extensions
I suspect one problem might be if the site is calling stopPropagation to interfere with how events bubble.

Does this work if you register listeners on the elements manually in DevTools? If so, the delegated events library might not be the right solution.
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/bd5a0197-eb61-4826-9b93-39e229cc9797n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages