Skip to content

Commit 4f7043a

Browse files
Apply suggestions from code review
Co-authored-by: Arman Bilge <[email protected]>
1 parent bd14f33 commit 4f7043a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ import scala.scalajs.js.annotation.JSGlobal
1515
class NDEFMessage(recordsAgr: js.Array[NDEFRecordInit]) extends js.Object {
1616

1717
/** Returns the list of NDEF records contained in the message. */
18-
var records: FrozenArray[NDEFRecord] = js.native
18+
def records: FrozenArray[NDEFRecord] = js.native
1919
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import scala.scalajs.js
1212
trait NDEFReadingEvent extends Event {
1313

1414
/** Returns an NDEFMessage object containing the received message. */
15-
var message: NDEFMessage = js.native
15+
def message: NDEFMessage = js.native
1616

1717
/** Returns the serial number of the device, which is used for anti-collision and identification, or an empty string
1818
* if no serial number is available.
1919
*/
20-
var serialNumber: String = js.native
20+
def serialNumber: String = js.native
2121

2222
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ class NDEFRecord(options: NDEFRecordInit) extends js.Object {
1414
* "empty", "text", "url", "smart-poster", "absolute-url", "mime", or "unknown" or else an external type name, which
1515
* consists of a domain name and custom type name separated by a colon (":").
1616
*/
17-
var recordType: String = js.native
17+
def recordType: String = js.native
1818

1919
/** Returns the MIME type of the record. This value will be null if recordType is not equal to "mime". */
20-
var mediaType: js.UndefOr[String] = js.native
20+
def mediaType: js.UndefOr[String] = js.native
2121

2222
/** Returns the record identifier, which is an absolute or relative URL used to identify the record.
2323
*
2424
* Note: The uniqueness of the identifier is enforced only by the generator of the record.
2525
*/
26-
var id: js.UndefOr[String] = js.native
26+
def id: js.UndefOr[String] = js.native
2727

2828
/** Returns a DataView containing the raw bytes of the record's payload. */
29-
var data: js.typedarray.DataView = js.native
29+
def data: js.typedarray.DataView = js.native
3030

3131
/** Returns the encoding of a textual payload, or null otherwise. */
32-
var encoding: js.UndefOr[String] = js.native
32+
def encoding: js.UndefOr[String] = js.native
3333

3434
/** Returns the language of a textual payload, or null if one was not supplied. */
35-
var lang: js.UndefOr[String] = js.native
35+
def lang: js.UndefOr[String] = js.native
3636

3737
/** Converts [[NDEFRecord.data]] to a sequence of records. This allows parsing the payloads of record types which may
3838
* contain nested records, such as smart poster and external type records.

0 commit comments

Comments
 (0)