mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
adding .isConnected DOM attribute
This commit is contained in:
parent
daf7138f36
commit
0231a0a712
5 changed files with 11 additions and 42 deletions
|
@ -2296,6 +2296,11 @@ impl NodeMethods for Node {
|
|||
USVString(String::from(self.owner_doc().base_url().as_str()))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-isconnected
|
||||
fn IsConnected(&self) -> bool {
|
||||
return self.is_connected();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-ownerdocument
|
||||
fn GetOwnerDocument(&self) -> Option<DomRoot<Document>> {
|
||||
match self.type_id() {
|
||||
|
|
|
@ -28,6 +28,9 @@ interface Node : EventTarget {
|
|||
[Pure]
|
||||
readonly attribute USVString baseURI;
|
||||
|
||||
[Pure]
|
||||
readonly attribute boolean isConnected;
|
||||
|
||||
[Pure]
|
||||
readonly attribute Document? ownerDocument;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue