Skip to content

Fold single-line ScalaDoc #556

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 1 commit 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
1 change: 1 addition & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ maxColumn = 120
danglingParentheses.callSite = false
danglingParentheses.ctrlSite = false
danglingParentheses.defnSite = false
docstrings.oneline = fold
docstrings.style = SpaceAsterisk
literals.hexDigits = Upper
literals.scientific = Upper
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/org/scalajs/dom/AbortController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import scala.scalajs.js.annotation.JSGlobal
@JSGlobal
class AbortController() extends js.Object {

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

/** Aborts a DOM request before it has completed. This is able to abort fetch requests, consumption of any response
Expand Down
87 changes: 29 additions & 58 deletions src/main/scala/org/scalajs/dom/Audio.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class AudioContext extends EventTarget {
/** Returns the current state of the AudioContext. */
def state: String = js.native

/** Closes the audio context, releasing any system audio resources that it uses.
*/
/** Closes the audio context, releasing any system audio resources that it uses. */
def close(): js.Promise[Unit] = js.native

/** Creates an AnalyserNode, which can be used to expose audio time and frequency data and for example to create data
Expand Down Expand Up @@ -106,12 +105,10 @@ class AudioContext extends EventTarget {
*/
def createDelay(maxDelayTime: Int): DelayNode = js.native

/** Creates a DynamicsCompressorNode, which can be used to apply acoustic compression to an audio signal.
*/
/** Creates a DynamicsCompressorNode, which can be used to apply acoustic compression to an audio signal. */
def createDynamicsCompressor(): DynamicsCompressorNode = js.native

/** Creates a GainNode, which can be used to control the overall volume of the audio graph.
*/
/** Creates a GainNode, which can be used to control the overall volume of the audio graph. */
def createGain(): GainNode = js.native

/** Creates a MediaElementAudioSourceNode associated with an HTMLMediaElement. This can be used to play and manipulate
Expand All @@ -135,25 +132,21 @@ class AudioContext extends EventTarget {
*/
def createMediaStreamDestination(): MediaStreamAudioDestinationNode = js.native

/** Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone.
*/
/** Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone. */
def createOscillator(): OscillatorNode = js.native

/** Creates a PannerNode, which is used to spatialise an incoming audio stream in 3D space.
*/
/** Creates a PannerNode, which is used to spatialise an incoming audio stream in 3D space. */
def createPanner(): PannerNode = js.native

/** Creates a PeriodicWave, used to define a periodic waveform that can be used to determine the output of an
* OscillatorNode.
*/
def createPeriodicWave(real: js.typedarray.Float32Array, imag: js.typedarray.Float32Array): PeriodicWave = js.native

/** Creates a StereoPannerNode, which can be used to apply stereo panning to an audio source.
*/
/** Creates a StereoPannerNode, which can be used to apply stereo panning to an audio source. */
def createStereoPanner(): StereoPannerNode = js.native

/** Creates a WaveShaperNode, which is used to implement non-linear distortion effects.
*/
/** Creates a WaveShaperNode, which is used to implement non-linear distortion effects. */
def createWaveShaper(): WaveShaperNode = js.native

/** Asynchronously decodes audio file data contained in an ArrayBuffer. In this case, the ArrayBuffer is usually
Expand All @@ -175,8 +168,7 @@ class AudioContext extends EventTarget {
errorCallback: js.Function0[_] = js.native
): js.Promise[AudioBuffer] = js.native

/** Resumes the progression of time in an audio context that has previously been suspended.
*/
/** Resumes the progression of time in an audio context that has previously been suspended. */
def resume(): js.Promise[Unit] = js.native

/** Suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing
Expand Down Expand Up @@ -269,12 +261,10 @@ trait AudioNode extends EventTarget {
*/
var channelInterpretation: String = js.native

/** Allows us to connect one output of this node to one input of another node.
*/
/** Allows us to connect one output of this node to one input of another node. */
def connect(audioNode: AudioNode): Unit = js.native

/** Allows us to connect one output of this node to one input of an audio parameter.
*/
/** Allows us to connect one output of this node to one input of an audio parameter. */
def connect(audioParam: AudioParam): Unit = js.native

/** Allows us to disconnect the current node from another one it is already connected to.
Expand Down Expand Up @@ -434,8 +424,7 @@ trait AudioBufferSourceNode extends AudioNode {
*/
def stop(when: Double = 0.0): Unit = js.native

/** Is an EventHandler containing the callback associated with the ended event.
*/
/** Is an EventHandler containing the callback associated with the ended event. */
var onended: js.Function1[Event, _] = js.native
}

Expand All @@ -458,8 +447,7 @@ trait AudioBufferSourceNode extends AudioNode {
@js.native
trait AudioDestinationNode extends AudioNode {

/** Is an unsigned long defining the maximum amount of channels that the physical device can handle.
*/
/** Is an unsigned long defining the maximum amount of channels that the physical device can handle. */
var maxChannelCount: Int = js.native
}

Expand All @@ -472,12 +460,10 @@ trait AudioDestinationNode extends AudioNode {
@js.native
trait AudioListener extends AudioNode {

/** Is a double value representing the amount of pitch shift to use when rendering a doppler effect.
*/
/** Is a double value representing the amount of pitch shift to use when rendering a doppler effect. */
var dopplerFactor: Double = js.native

/** Is a double value representing the speed of sound, in meters per second.
*/
/** Is a double value representing the speed of sound, in meters per second. */
var speedOfSound: Double = js.native

/** Defines the position of the listener.
Expand Down Expand Up @@ -552,8 +538,7 @@ trait AudioParam extends AudioNode {
*/
var value: Double = js.native

/** Represents the initial value of the attributes as defined by the specific AudioNode creating the AudioParam.
*/
/** Represents the initial value of the attributes as defined by the specific AudioNode creating the AudioParam. */
val defaultValue: Double = js.native

/** Schedules an instant change to the value of the AudioParam at a precise time, as measured against
Expand Down Expand Up @@ -646,20 +631,16 @@ trait BiquadFilterNode extends AudioNode {
*/
val frequency: AudioParam = js.native

/** Is an a-rate AudioParam representing detuning of the frequency in cents.
*/
/** Is an a-rate AudioParam representing detuning of the frequency in cents. */
val detune: AudioParam = js.native

/** Is a k-rate AudioParam, a double representing a Q factor, or quality factor.
*/
/** Is a k-rate AudioParam, a double representing a Q factor, or quality factor. */
val Q: AudioParam = js.native

/** Is a k-rate AudioParam, a double representing the gain used in the current filtering algorithm.
*/
/** Is a k-rate AudioParam, a double representing the gain used in the current filtering algorithm. */
val gain: AudioParam = js.native

/** Is a string value defining the kind of filtering algorithm the node is implementing.
*/
/** Is a string value defining the kind of filtering algorithm the node is implementing. */
var `type`: String = js.native

/** From the current filter parameter settings this method calculates the frequency response for frequencies specified
Expand Down Expand Up @@ -778,8 +759,7 @@ trait DelayNode extends AudioNode {
@js.native
trait DynamicsCompressorNode extends AudioNode {

/** Is a k-rate AudioParam representing the decibel value above which the compression will start taking effect.
*/
/** Is a k-rate AudioParam representing the decibel value above which the compression will start taking effect. */
val threshold: AudioParam = js.native

/** Is a k-rate AudioParam containing a decibel value representing the range above the threshold where the curve
Expand All @@ -797,12 +777,10 @@ trait DynamicsCompressorNode extends AudioNode {
*/
val reduction: AudioParam = js.native

/** Is a k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB.
*/
/** Is a k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB. */
val attack: AudioParam = js.native

/** Is a k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB.
*/
/** Is a k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB. */
val release: AudioParam = js.native
}

Expand Down Expand Up @@ -909,8 +887,7 @@ trait OscillatorNode extends AudioNode {
*/
var detune: AudioParam = js.native

/** Represents the shape of the oscillator wave generated. Different waves will produce different tones.
*/
/** Represents the shape of the oscillator wave generated. Different waves will produce different tones. */
var `type`: String = js.native // Not sure if this is correct ...

/** This method specifies the exact time to start playing the tone. */
Expand All @@ -926,8 +903,7 @@ trait OscillatorNode extends AudioNode {
*/
def setPeriodicWave(wave: PeriodicWave): Unit = js.native

/** Used to set the event handler for the ended event, which fires when the tone has stopped playing.
*/
/** Used to set the event handler for the ended event, which fires when the tone has stopped playing. */
var onended: js.Function1[Event, _] = js.native
}

Expand All @@ -949,8 +925,7 @@ trait OscillatorNode extends AudioNode {
@js.native
trait PannerNode extends AudioNode {

/** Is an enumerated value determining which spatialisation algorithm to use to position the audio in 3D space.
*/
/** Is an enumerated value determining which spatialisation algorithm to use to position the audio in 3D space. */
var panningModel: String = js.native

/** Is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves
Expand Down Expand Up @@ -1097,16 +1072,13 @@ trait WaveShaperNode extends AudioNode {
@js.native
trait AudioBuffer extends js.Object {

/** Returns a float representing the sample rate, in samples per second, of the PCM data stored in the buffer.
*/
/** Returns a float representing the sample rate, in samples per second, of the PCM data stored in the buffer. */
val sampleRate: Double = js.native

/** Returns an integer representing the length, in sample-frames, of the PCM data stored in the buffer.
*/
/** Returns an integer representing the length, in sample-frames, of the PCM data stored in the buffer. */
val length: Int = js.native

/** Returns a double representing the duration, in seconds, of the PCM data stored in the buffer.
*/
/** Returns a double representing the duration, in seconds, of the PCM data stored in the buffer. */
val duration: Double = js.native

/** Returns an integer representing the number of discrete audio channels described by the PCM data stored in the
Expand Down Expand Up @@ -1158,8 +1130,7 @@ trait AudioBuffer extends js.Object {
@js.native
trait OfflineAudioCompletionEvent extends Event {

/** The buffer containing the result of the processing of an OfflineAudioContext.
*/
/** The buffer containing the result of the processing of an OfflineAudioContext. */
val renderedBuffer: AudioBuffer = js.native
}

Expand Down
45 changes: 15 additions & 30 deletions src/main/scala/org/scalajs/dom/CSSTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ class CSSStyleDeclaration extends js.Object {
var transformStyle: String = js.native
}

/** An object implementing the CSSStyleSheet interface represents a single CSS style sheet.
*/
/** An object implementing the CSSStyleSheet interface represents a single CSS style sheet. */
@js.native
@JSGlobal
class CSSStyleSheet extends StyleSheet {
Expand All @@ -257,23 +256,20 @@ class CSSStyleSheet extends StyleSheet {
*/
var ownerRule: CSSRule = js.native

/** Returns a CSSRuleList of the CSS rules in the style sheet.
*/
/** Returns a CSSRuleList of the CSS rules in the style sheet. */
var cssRules: CSSRuleList = js.native
var id: String = js.native

def addImport(bstrURL: String, lIndex: Int = js.native): Int = js.native

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.
*/
/** The CSSStyleSheet.insertRule() method inserts a new style rule into the current style sheet. */
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.
*/
/** Deletes a rule from the style sheet. */
def deleteRule(index: Int = js.native): Unit = js.native

def addRule(bstrSelector: String, bstrStyle: String = js.native, lIndex: Int = js.native): Int = js.native
Expand All @@ -288,13 +284,11 @@ class CSSStyleSheet extends StyleSheet {
@JSGlobal
class CSSStyleRule extends CSSRule {

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

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

Expand All @@ -305,8 +299,7 @@ class CSSStyleRule extends CSSRule {
@JSGlobal
class CSSMediaRule extends CSSRule {

/** Specifies a MediaList representing the intended destination medium for style information.
*/
/** Specifies a MediaList representing the intended destination medium for style information. */
var media: MediaList = js.native
var cssRules: CSSRuleList = js.native

Expand All @@ -322,8 +315,7 @@ class CSSMediaRule extends CSSRule {
@JSGlobal
class CSSNamespaceRule extends CSSRule {

/** Returns a DOMString containing the text of the URI of the given namespace.
*/
/** Returns a DOMString containing the text of the URI of the given namespace. */
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 
Expand Down Expand Up @@ -352,8 +344,7 @@ class CSSRule extends js.Object {
*/
var cssText: String = js.native

/** parentStyleSheet returns the stylesheet object in which the current rule is defined.
*/
/** parentStyleSheet returns the stylesheet object in which the current rule is defined. */
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
Expand Down Expand Up @@ -401,18 +392,15 @@ class CSSFontFaceRule extends CSSRule {
class CSSPageRule extends CSSRule {
var pseudoClass: String = js.native

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

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

/** A CSSRuleList is an array-like object containing an ordered collection of CSSRule objects.
*/
/** A CSSRuleList is an array-like object containing an ordered collection of CSSRule objects. */
@js.native
@JSGlobal
class CSSRuleList private[this] () extends DOMList[CSSRule] {
Expand All @@ -427,12 +415,10 @@ class CSSRuleList private[this] () extends DOMList[CSSRule] {
@JSGlobal
class CSSKeyframesRule extends CSSRule {

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

/** Returns a CSSRuleList of the CSS rules in the media rule.
*/
/** Returns a CSSRuleList of the CSS rules in the media rule. */
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
Expand Down Expand Up @@ -465,7 +451,6 @@ class CSSKeyframeRule extends CSSRule {
*/
var keyText: String = js.native

/** Returns a CSSStyleDeclaration of the CSS style associated with the keyfrom.
*/
/** Returns a CSSStyleDeclaration of the CSS style associated with the keyfrom. */
var style: CSSStyleDeclaration = js.native
}
3 changes: 1 addition & 2 deletions src/main/scala/org/scalajs/dom/DeprecatedCSSAliases.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package org.scalajs.dom

import org.scalajs.dom

/** Short aliases of all the dom.CSSThing classes
*/
/** Short aliases of all the dom.CSSThing classes */
@deprecated("directly use the dom.CSS* types and values instead", "2.0.0")
object DeprecatedCSSAliases {

Expand Down
Loading