osmanager / open-webkit-sharp

Automatically exported from code.google.com/p/open-webkit-sharp
0 stars 0 forks source link

"Select" and "Option" tags #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open any website with a dropdown select using Webkit.Webkitbrowser
2. Dim selectElements As WebKit.DOM.NodeList = DirectCast(sender, 
WebKit.WebKitBrowser).Document.GetElementsByTagName("select")
3. For Each curElement As WebKit.DOM.HTMLElement In selects
4. Dim optionElements As WebKit.DOM.NodeList = 
curElement.getElementsByTagName("option")
'error says:
'getElementsByTagName' is not a member of 'WebKit.DOM.HTMLElement'. 

What is the expected output? What do you see instead?
I am not really sure myself, but I think any HTMLElement is able to contain 
another HTMLElement inside.

What version of the product are you using? On what operating system?
VisualBasic.NET 2008 on Windows Vista

Please provide any additional information below.
I think it is already clear

Thank you for the development of open-webkit-sharp.
I am very happy with your software. =)

Original issue reported on code.google.com by dothebe...@gmail.com on 14 Mar 2012 at 11:04

GoogleCodeExporter commented 9 years ago
I found a way to fix this bug/unimplemented feature. Until I release a new 
version try using: 
WebKit.DOM.NodeList.Create(DirectCast(curElement.GetWebKitObject(), 
WebKit.Interop.IDOMNode).getElementsByTagName("option")).<whatevermethodorproper
ty>

Original comment by tsumalis96@gmail.com on 17 Mar 2012 at 12:11

GoogleCodeExporter commented 9 years ago
Hi tsumali,

I get this error:

'WebKit.DOM.NodeList.Friend Shared Function Create(NodeList As 
WebKit.Interop.IDOMNodeList) As WebKit.DOM.NodeList' is not accessible in this 
context because it is 'Friend'.

Is there something that I miss?

Original comment by dothebe...@gmail.com on 17 Mar 2012 at 9:16

GoogleCodeExporter commented 9 years ago
In C# this is called "internal", so open OpenWebKitSharp.sln, go to 
WebKitDOMCoreClasses and change any internal word to public e.g. internal class 
NodeList to public class NodeList and internal static NodeList Create(...) to 
public static NodeList Create(..)

Original comment by tsumalis96@gmail.com on 18 Mar 2012 at 6:43

GoogleCodeExporter commented 9 years ago
Hi tsumali,

I have changed all the "internal", "protected", and "private" to "public"
But it still has the exact same errors.

I also cannot find the word 'Friend' mentioned in WebKitDOMCoreClasses

Please help

Original comment by dothebe...@gmail.com on 20 Mar 2012 at 10:17

GoogleCodeExporter commented 9 years ago
Friend is Internal in C#. Also, try replacing Internal and Private with Publid 
inside WebKitDOMHTMLClasses

Original comment by tsumalis96@gmail.com on 21 Mar 2012 at 3:03