Skip to content

Commit 335d828

Browse files
committed
Rebased and renamed name member in the constructor
1 parent d0ef860 commit 335d828

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

api-reports/2_12.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,7 @@ FetchEventInit[JT] var scoped: js.UndefOr[Boolean]
19471947
File[JC] def arrayBuffer(): js.Promise[ArrayBuffer]
19481948
File[JC] def close(): Unit (@deprecated in 1.2.0)
19491949
File[JC] def lastModified: Int
1950+
File[JC] def name: String
19501951
File[JC] def size: Double
19511952
File[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
19521953
File[JC] def stream(): ReadableStream[Uint8Array]
@@ -26929,8 +26930,8 @@ intl/NumberFormatOptions[JT] var useGrouping: js.UndefOr[Boolean]
2692926930
intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style: js.UndefOr[String]?, currency: js.UndefOr[String]?, currencyDisplay: js.UndefOr[String]?, useGrouping: js.UndefOr[Boolean]?, minimumIntegerDigits: js.UndefOr[Double]?, minimumFractionDigits: js.UndefOr[Double]?, maximumFractionDigits: js.UndefOr[Double]?, minimumSignificantDigits: js.UndefOr[Double]?, maximumSignificantDigits: js.UndefOr[Double]?): NumberFormatOptions (@deprecated in 2.0.0)
2693026931
package[SO] type AlgorithmIdentifier = Algorithm | String
2693126932
package[SO] type BigInteger = js.typedarray.Uint8Array
26932-
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
2693326933
package[SO] type BlobPart = BufferSource | Blob | String
26934+
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
2693426935
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
2693526936
package[SO] type ByteString = String
2693626937
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)

api-reports/2_13.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,7 @@ FetchEventInit[JT] var scoped: js.UndefOr[Boolean]
19471947
File[JC] def arrayBuffer(): js.Promise[ArrayBuffer]
19481948
File[JC] def close(): Unit (@deprecated in 1.2.0)
19491949
File[JC] def lastModified: Int
1950+
File[JC] def name: String
19501951
File[JC] def size: Double
19511952
File[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
19521953
File[JC] def stream(): ReadableStream[Uint8Array]
@@ -26929,8 +26930,8 @@ intl/NumberFormatOptions[JT] var useGrouping: js.UndefOr[Boolean]
2692926930
intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style: js.UndefOr[String]?, currency: js.UndefOr[String]?, currencyDisplay: js.UndefOr[String]?, useGrouping: js.UndefOr[Boolean]?, minimumIntegerDigits: js.UndefOr[Double]?, minimumFractionDigits: js.UndefOr[Double]?, maximumFractionDigits: js.UndefOr[Double]?, minimumSignificantDigits: js.UndefOr[Double]?, maximumSignificantDigits: js.UndefOr[Double]?): NumberFormatOptions (@deprecated in 2.0.0)
2693026931
package[SO] type AlgorithmIdentifier = Algorithm | String
2693126932
package[SO] type BigInteger = js.typedarray.Uint8Array
26932-
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
2693326933
package[SO] type BlobPart = BufferSource | Blob | String
26934+
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
2693426935
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
2693526936
package[SO] type ByteString = String
2693626937
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)

dom/src/main/scala/org/scalajs/dom/File.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ import scala.scalajs.js.annotation._
1919
*/
2020
@js.native
2121
@JSGlobal
22-
class File(bits: js.Iterable[BlobPart], name: String, options: FilePropertyBag = js.native)
22+
class File(bits: js.Iterable[BlobPart], _name: String, options: FilePropertyBag = js.native)
2323
extends Blob(bits, options) {
2424

25+
/** Returns the name of the file. For security reasons, the path is excluded from this property. */
26+
def name: String = js.native
27+
2528
/** The File.lastModified read-only property provides the last modified date of the file as the number of milliseconds
2629
* since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current
2730
* date.

0 commit comments

Comments
 (0)