Skip to content

Commit 7e9e8df

Browse files
committed
Merge pull request #387 from mattjphillips/add_ns_methods
Add missing namespaced methods to Html.Document. And ImportNode.
2 parents d3d561b + 4fac58c commit 7e9e8df

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/Libraries/Web/Html/Document.cs

+49
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,53 @@ public static void AddEventListener(string eventName, ElementEventListener liste
148148
public static void AttachEvent(string eventName, ElementEventHandler handler) {
149149
}
150150

151+
/// <summary>
152+
/// Creates an Attr of the given name. Note that the Attr instance can then be set on an
153+
/// Element using the setAttributeNode method. To create an attribute with a qualified name
154+
/// and namespace URI, use the CreateAttributeNS method.
155+
/// </summary>
156+
/// <param name="name">The name of the attribute.</param>
157+
/// <returns>A new Attr object with the nodeName attribute set to name, and localName, prefix,
158+
/// and namespaceURI set to null. The value of the attribute is the empty string.</returns>
151159
public static ElementAttribute CreateAttribute(string name) {
152160
return null;
153161
}
154162

163+
/// <summary>
164+
/// Creates an attribute of the given qualified name and namespace URI.
165+
/// </summary>
166+
/// <param name="namespaceURI">The namespace URI of the attribute to create.</param>
167+
/// <param name="qualifiedName">The qualified name of the attribute to instantiate.</param>
168+
/// <returns>A new Attr object with the given namespace and qualified name.</returns>
169+
public static ElementAttribute CreateAttributeNS(string namespaceURI, string qualifiedName) {
170+
return null;
171+
}
172+
155173
public static DocumentFragment CreateDocumentFragment() {
156174
return null;
157175
}
158176

177+
/// <summary>
178+
/// Creates an element of the type specified.
179+
/// To create an element with a qualified name and namespace URI, use the CreateElementNS method.
180+
/// </summary>
181+
/// <param name="tagName">The name of the element type to instantiate.</param>
182+
/// <returns>A new Element object with the nodeName attribute set to tagName, and localName,
183+
/// prefix, and namespaceURI set to null.</returns>
159184
public static Element CreateElement(string tagName) {
160185
return null;
161186
}
162187

188+
/// <summary>
189+
/// Creates an element of the given qualified name and namespace URI.
190+
/// </summary>
191+
/// <param name="namespaceURI">The namespace URI of the element to create.</param>
192+
/// <param name="qualifiedName">The qualified name of the element type to instantiate.</param>
193+
/// <returns>A new Element object with the given namespace and qualified name.</returns>
194+
public static Element CreateElementNS(string namespaceURI, string qualifiedName) {
195+
return null;
196+
}
197+
163198
public static MutableEvent CreateEvent(string eventType) {
164199
return null;
165200
}
@@ -168,6 +203,10 @@ public static Element CreateTextNode(string data) {
168203
return null;
169204
}
170205

206+
public static Element ImportNode(Element imporedNode, bool deep) {
207+
return null;
208+
}
209+
171210
public static void DetachEvent(string eventName, ElementEventHandler handler) {
172211
}
173212

@@ -206,6 +245,16 @@ public static ElementCollection GetElementsByTagName(string tagName) {
206245
return null;
207246
}
208247

248+
/// <summary>
249+
/// Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree.
250+
/// </summary>
251+
/// <param name="namespaceURI">The namespace URI of the elements to match on. The special value "*" matches all namespaces.</param>
252+
/// <param name="localName">The local name of the elements to match on. The special value "*" matches all local names.</param>
253+
/// <returns>A new NodeList object containing all the matched Elements.</returns>
254+
public static ElementCollection GetElementsByTagNameNS(string namespaceURI, string localName) {
255+
return null;
256+
}
257+
209258
public static bool HasFocus() {
210259
return false;
211260
}

0 commit comments

Comments
 (0)