Skip to content

deprecate Node.isSameNode Node.isSupported. add missing Node.contains #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/main/scala/org/scalajs/dom/lib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ class Node extends EventTarget {
* The Node.isSupported()returns a Boolean flag containing the result of a test
* whether the DOM implementation implements a specific feature and this feature is
* supported by the specific node.
*
* @deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deprecated should be a real annotation, not part of the comment. Otherwise it's not really deprecated.

* This feature is obsolete. Although it may still work in some browsers, its use
* is discouraged since it could be removed at any time. Try to avoid using it.
* MDN
*/
def isSupported(feature: String, version: String): Boolean = ???
Expand Down Expand Up @@ -991,6 +993,15 @@ class Node extends EventTarget {
/**
* Tests whether two nodes are the same, that is they reference the same object.
*
* @deprecated
* {{{
* // Instead of using
* node1.isSameNode(node2)
*
* // use
* node1 === node2 // or
* node1 == node2
* }}}
* MDN
*/
def isSameNode(other: Node): Boolean = ???
Expand Down Expand Up @@ -1040,6 +1051,13 @@ class Node extends EventTarget {
* MDN
*/
def insertBefore(newChild: Node, refChild: Node = ???): Node = ???

/**
* @return a Boolean value indicating whether a node is a descendant of a given node. or not.
*
* MDN
*/
def contains(otherNode: Node): Boolean = ???
}


Expand Down