[webkit-gtk] webkit_dom_element_get_elements_by_tag_name doesn't work properly
Carlos Garcia Campos
cgarcia at igalia.com
Mon Nov 25 23:34:11 PST 2013
El lun, 25-11-2013 a las 20:15 +0100, Ángel Luis escribió:
> Nobody knows whats happen?
I'll look at this when I have some time, you could open a bug report,
attaching your test case there, and adding me to the CC so that I won't
forget.
> I tried with
>
> WebKitDOMNodeList* video = webkit_dom_document_get_elements_by_tag_name(dom, "*");
> instead
>
> WebKitDOMNodeList* video = webkit_dom_element_get_elements_by_tag_name(dom, "*");
> and the output is the same:
>
> tag: HTML
> tag: HEAD
> tag: BODY
>
>
> El 21/11/13 20:25, Ángel Luis escribió:
>
> > I am trying to print name of nodes from DOM with WebKitGTK with the
> > following code:
> >
> > WebKitDOMDocument *dom = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(webView));
> > WebKitDOMNodeList* video = webkit_dom_element_get_elements_by_tag_name(dom, "*");
> >
> > gulong element_count = webkit_dom_node_list_get_length(video);
> > int i = 0;
> > for (i = 0; i < element_count; i++)
> > {
> > WebKitDOMNode *element = webkit_dom_node_list_item(video, i);
> > printf("tag: %s\n",webkit_dom_node_get_node_name (element));
> >
> > }
> >
> >
> > And I have the following webpage:
> >
> > <!DOCTYPE html>
> > <html>
> > <head>
> > </head>
> > <body>
> > <video id="video" autoplay preload="none" width="320"
> > height="240">
> > <source src="./movie.ogg" type="video/ogg">
> > Your browser does not support the video tag.
> > </video>
> > <video id="video2" width="320" height="240" autoplay
> > preload="none">
> > <source src="./movie.ogg" type="video/ogg">
> > Your browser does not support the video tag.
> > </video>
> > <input type="hidden" id="prueba" name="finish"
> > value="false">
> > </body>
> > </html>
> >
> >
> >
> > And the output of my program is:
> >
> > tag: HTML
> > tag: HEAD
> > tag: BODY
> >
> > I don't understand why it output that, the output should be:
> >
> > tag: HTML
> > tag: HEAD
> > tag: BODY
> > tag: VIDEO
> > tag: SOURCE
> > tag: VIDEO
> > tag: SOURCE
> > tag: INPUT
> >
> > Anyone know what's happend?
> >
> > Thanks
> >
> >
> >
> >
> > _______________________________________________
> > webkit-gtk mailing list
> > webkit-gtk at lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-gtk
>
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
--
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20131126/ebbc77c7/attachment.sig>
More information about the webkit-gtk
mailing list