API Docs for: undefined
Show:

QrCode.ByteData Class

This class encodes a value in byte mode. Byte mode encodes strings as raw binary data.

Constructor

QrCode.ByteData

(
  • config
)

Parameters:

  • config Object

    Configuration object.

Item Index

Methods

toBinaryString

(
  • version
)
String

Returns a properly formatted binary string for byte data.

Parameters:

Returns:

toBinaryString

(
  • version
)
String

This is an abstract method that should be implemented to return a properly formatted binary string for a specific data encoding mode.

Parameters:

Returns:

Attributes

characterWidth

Number

The number of bits used to encode each character.

Default: 8

Fires event characterWidthChange

Fires when the value for the configuration attribute characterWidth is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

type

String

Inherited from QrCode.Data but overwritten in js/qr-code-generator-base.js:4621

Default: 'byte'

Fires event typeChange

Fires when the value for the configuration attribute type is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

value

Number | String

Inherited from QrCode.Data but overwritten in js/qr-code-generator-base.js:4631

Fires event valueChange

Fires when the value for the configuration attribute value is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.