PDA

View Full Version : get html tag by clicking (webkit)



billconan
23rd June 2009, 23:07
hello guys,

i want to implement a web browser feature such that when i click on the web page, i should be able to know what kind of html tag is under clicking.

for example, if the user click on an image, i can know that he is clicking on a <img> tag.

i modified the hitTestContent function to do this. the code works fine except detecting youtube videos and hulu videos. i have tried some other flash video site, my code can tell me that i'm clicking on a <embed> tag. but as for youtube videos, when i click on them, the mousePressEvent function is not called. (i'm testing with the qt demo browser)

so i don't know how can i detect these videos, because the thing i want to implement is a video detector.

thanks.