Skip to content

Remove MDN from scaladocs #554

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

Merged
merged 4 commits into from
Sep 5, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Documentation marked "MDN" is thanks to Mozilla Contributors
All documentation for facades is thanks to Mozilla Contributors
at https://developer.mozilla.org/en-US/docs/Web/API and available
under the Creative Commons Attribution-ShareAlike v2.5 or later.
http://creativecommons.org/licenses/by-sa/2.5/
Expand Down
12 changes: 0 additions & 12 deletions src/main/scala/org/scalajs/dom/AbortController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,33 @@ import scala.scalajs.js.annotation.JSGlobal

/** The AbortController interface represents a controller object that allows you to abort one or more DOM requests as
* and when desired.
*
* MDN
*/
@js.native
@JSGlobal
class AbortController() extends js.Object {

/** Returns a AbortSignal object instance, which can be used to communicate with/abort a DOM request
*
* MDN
*/
val signal: AbortSignal = js.native

/** Aborts a DOM request before it has completed. This is able to abort fetch requests, consumption of any response
* Body, and streams.
*
* MDN
*/
def abort(): Unit = js.native
}

/** The AbortSignal interface represents a signal object that allows you to communicate with a DOM request (such as a
* Fetch) and abort it if required via an AbortController object.
*
* MDN
*/
@js.native
trait AbortSignal extends EventTarget {

/** A Boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not
* (false).
*
* MDN
*/
def aborted: Boolean = js.native

/** Invoked when an abort event fires, i.e. when the DOM request(s) the signal is communicating with is/are aborted.
*
* MDN
*/
var onabort: js.Function0[Any] = js.native
}
70 changes: 2 additions & 68 deletions src/main/scala/org/scalajs/dom/CSSTypes.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Documentation marked "MDN" is thanks to Mozilla Contributors at https://developer.mozilla.org/en-US/docs/Web/API and
* available under the Creative Commons Attribution-ShareAlike v2.5 or later.
/** All documentation for facades is thanks to Mozilla Contributors at https://developer.mozilla.org/en-US/docs/Web/API
* and available under the Creative Commons Attribution-ShareAlike v2.5 or later.
* http://creativecommons.org/licenses/by-sa/2.5/
*
* Everything else is under the MIT License http://opensource.org/licenses/MIT
Expand All @@ -15,24 +15,18 @@ object CSS extends js.Object {

/** The CSS.supports() method returns a boolean value indicating if the browser supports a given CSS feature, or not.
* Allows to test the support of a pair property-value.
*
* MDN
*/
def supports(propertyName: String, value: String): Boolean = js.native

/** The CSS.supports() method returns a boolean value indicating if the browser supports a given CSS feature, or not.
* Takes one parameter matching the condition of @supports.
*
* MDN
*/
def supports(supportCondition: String): Boolean = js.native

}

/** A CSSStyleDeclaration is an interface to the declaration block returned by the style property of a cssRule in a
* stylesheet, when the rule is a CSSStyleRule.
*
* MDN
*/
@js.native
@JSGlobal
Expand Down Expand Up @@ -247,8 +241,6 @@ class CSSStyleDeclaration extends js.Object {
}

/** An object implementing the CSSStyleSheet interface represents a single CSS style sheet.
*
* MDN
*/
@js.native
@JSGlobal
Expand All @@ -262,14 +254,10 @@ class CSSStyleSheet extends StyleSheet {

/** If this style sheet is imported into the document using an `@import` rule, the ownerRule property will return that
* CSSImportRule, otherwise it returns null.
*
* MDN
*/
var ownerRule: CSSRule = js.native

/** Returns a CSSRuleList of the CSS rules in the style sheet.
*
* MDN
*/
var cssRules: CSSRuleList = js.native
var id: String = js.native
Expand All @@ -279,16 +267,12 @@ class CSSStyleSheet extends StyleSheet {
def addPageRule(bstrSelector: String, bstrStyle: String, lIndex: Int = js.native): Int = js.native

/** The CSSStyleSheet.insertRule() method inserts a new style rule into the current style sheet.
*
* MDN
*/
def insertRule(rule: String, index: Int = js.native): Int = js.native

def removeRule(lIndex: Int): Unit = js.native

/** Deletes a rule from the style sheet.
*
* MDN
*/
def deleteRule(index: Int = js.native): Unit = js.native

Expand All @@ -299,39 +283,29 @@ class CSSStyleSheet extends StyleSheet {

/** CSSStyleRule represents a single CSS style rule. It implements the CSSRule interface with a type value of 1
* (CSSRule.STYLE_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSStyleRule extends CSSRule {

/** Gets/sets the textual representation of the selector for this rule, e.g. "h1,h2".
*
* MDN
*/
var selectorText: String = js.native
var readOnly: Boolean = js.native

/** Returns the CSSStyleDeclaration object for the rule.
*
* MDN
*/
val style: CSSStyleDeclaration = js.native
}

/** CSSMediaRule is an object representing a single CSS `@media` rule. It implements the CSSConditionRule interface, and
* therefore the CSSGroupingRule and the CSSRule interface with a type value of 4 (CSSRule.MEDIA_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSMediaRule extends CSSRule {

/** Specifies a MediaList representing the intended destination medium for style information.
*
* MDN
*/
var media: MediaList = js.native
var cssRules: CSSRuleList = js.native
Expand All @@ -343,23 +317,17 @@ class CSSMediaRule extends CSSRule {

/** The CSSNamespaceRule interface describes an object representing a single CSS `@@namespace` at-rule. It implements
* the CSSRule interface, with a type value of 10 (CSSRule.NAMESPACE_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSNamespaceRule extends CSSRule {

/** Returns a DOMString containing the text of the URI of the given namespace.
*
* MDN
*/
var namespaceURI: String = js.native

/** Returns a DOMString with the name of the prefix associated to this namespace. If there is no such prefix, returns 
* null.
*
* MDN
*/
var prefix: String = js.native
}
Expand All @@ -374,30 +342,22 @@ class CSSImportRule extends CSSRule {

/** An object implementing the CSSRule DOM interface represents a single CSS at-rule. References to a
* CSSRule-implementing object may be obtained by looking at a CSS style sheet's cssRules list.
*
* MDN
*/
@js.native
@JSGlobal
class CSSRule extends js.Object {

/** cssText returns the actual text of the style rule. To be able to set a stylesheet rule dynamically, see Using
* dynamic styling information.
*
* MDN
*/
var cssText: String = js.native

/** parentStyleSheet returns the stylesheet object in which the current rule is defined.
*
* MDN
*/
var parentStyleSheet: CSSStyleSheet = js.native

/** Returns the containing rule, otherwise null. E.g. if this rule is a style rule inside an `@media` block, the
* parent rule would be that CSSMediaRule.
*
* MDN
*/
var parentRule: CSSRule = js.native
var `type`: Int = js.native
Expand Down Expand Up @@ -435,31 +395,23 @@ class CSSFontFaceRule extends CSSRule {

/** CSSPageRule is an object representing a single CSS `@page` rule. It implements the CSSRule interface with a type
* value of 6 (CSSRule.PAGE_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSPageRule extends CSSRule {
var pseudoClass: String = js.native

/** Represents the text of the page selector associated with the at-rule.
*
* MDN
*/
var selectorText: String = js.native
var selector: String = js.native

/** Returns the declaration block associated with the at-rule.
*
* MDN
*/
var style: CSSStyleDeclaration = js.native
}

/** A CSSRuleList is an array-like object containing an ordered collection of CSSRule objects.
*
* MDN
*/
@js.native
@JSGlobal
Expand All @@ -470,68 +422,50 @@ class CSSRuleList private[this] () extends DOMList[CSSRule] {
/** The CSSKeyframesRule interface describes an object representing a complete set of keyframes for a CSS animation. It
* corresponds to the contains of a whole `@@keyframes` at-rule. It implements the CSSRule interface with a type value
* of 7 (CSSRule.KEYFRAMES_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSKeyframesRule extends CSSRule {

/** Represents the name of the animation, used by the animation-name property.
*
* MDN
*/
var name: String = js.native

/** Returns a CSSRuleList of the CSS rules in the media rule.
*
* MDN
*/
var cssRules: CSSRuleList = js.native

/** Returns a keyframe rule corresponding to the given key. The key is a DOMString containing an index of the keyframe
* o be returned, resolving to a number between 0 and 1. If no such keyframe exists, findRule returns null.
*
* MDN
*/
def findRule(rule: String): CSSKeyframeRule = js.native

/** Deletes a keyframe rule from the current CSSKeyframesRule. The parameter is the index of the keyframe to be
* deleted, expressed as a DOMString resolving as a number between 0 and 1.
*
* MDN
*/
def deleteRule(rule: String): Unit = js.native

/** Inserts a new keyframe rule into the current CSSKeyframesRule. The parameter is a DOMString containing a keyframe
* in the same format as an entry of a `@keyframes` at-rule. If it contains more than one keyframe rule, a
* DOMException with a SYNTAX_ERR is thrown.
*
* MDN
*/
def appendRule(rule: String): Unit = js.native
}

/** The CSSKeyframeRule interface describes an object representing a set of style for a given keyframe. It corresponds
* to the contains of a single keyframe of a `@@keyframes` at-rule. It implements the CSSRule interface with a type
* value of 8 (CSSRule.KEYFRAME_RULE).
*
* MDN
*/
@js.native
@JSGlobal
class CSSKeyframeRule extends CSSRule {

/** Represents the key of the keyframe, like '10%', '75%'. The from keyword maps to '0%' and the to keyword maps to
* '100%'.
*
* MDN
*/
var keyText: String = js.native

/** Returns a CSSStyleDeclaration of the CSS style associated with the keyfrom.
*
* MDN
*/
var style: CSSStyleDeclaration = js.native
}
12 changes: 5 additions & 7 deletions src/main/scala/org/scalajs/dom/Fetch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Fetch extends js.Object {
def fetch(info: RequestInfo, init: RequestInit = null): js.Promise[Response] = js.native
}

/** The Request interface of the Fetch API represents a resource request. MDN
/** The Request interface of the Fetch API represents a resource request.
*
* see [[https://fetch.spec.whatwg.org/#request-class ¶6.3 Request Class]] in whatwg spec
*
Expand Down Expand Up @@ -173,12 +173,12 @@ trait ResponseInit extends js.Object {
@js.native
trait Body extends js.Object {

/** MDN: Contains a Boolean that indicates whether the body has been read.
*/
/* Contains a Boolean that indicates whether the body has been read.
*/
def bodyUsed: Boolean = js.native

/** MDN: Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.
*/
/* Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.
*/
def arrayBuffer(): js.Promise[ArrayBuffer] = js.native

/** Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob.
Expand Down Expand Up @@ -216,8 +216,6 @@ trait Body extends js.Object {
*
* You can retrieve a Headers object via the Request.headers and Response.headers properties, and create a new Headers
* object using the Headers.Headers() constructor.
*
* MDN
*/
@js.native
@JSGlobal
Expand Down
Loading