write(contents, width, height, hints = null) {
        if (contents.length === 0) {
            throw new IllegalArgumentException('Found empty contents');
        }
        if (width < 0 || height < 0) {
            throw new IllegalArgumentException('Requested dimensions are too small: ' + width + 'x' + height);
        }
        let quietZone = hints && hints.get(EncodeHintType.MARGIN) !== undefined
            ? Number.parseInt(hints.get(EncodeHintType.MARGIN).toString(), 10)
            : BrowserSvgCodeWriter.QUIET_ZONE_SIZE;
        const code = this.encode(hints, contents);
        return this.renderResult(code, width, height, quietZone);
    }
/**
     * Writes the QR code to a SVG and renders it in the container.
     */
Writes the QR code to a SVG and renders it in the container.
Writes the QR code to a SVG and renders it in the container .
write(contents, width, height, hints = null) {
        if (contents.length === 0) {
            throw new IllegalArgumentException('Found empty contents');
        }
        if (width < 0 || height < 0) {
            throw new IllegalArgumentException('Requested dimensions are too small: ' + width + 'x' + height);
        }
        let quietZone = hints && hints.get(EncodeHintType.MARGIN) !== undefined
            ? Number.parseInt(hints.get(EncodeHintType.MARGIN).toString(), 10)
            : BrowserSvgCodeWriter.QUIET_ZONE_SIZE;
        const code = this.encode(hints, contents);
        return this.renderResult(code, width, height, quietZone);
    }
write ( contents , width , height , hints = null ) { if ( contents . length === 0 ) { throw new IllegalArgumentException ( 'Found empty contents' ) ; } if ( width < 0 || height < 0 ) { throw new IllegalArgumentException ( 'Requested dimensions are too small: ' + width + 'x' + height ) ; } let quietZone = hints && hints . get ( EncodeHintType . MARGIN ) !== undefined ? Number . parseInt ( hints . get ( EncodeHintType . MARGIN ) . toString ( ) , 10 ) : BrowserSvgCodeWriter . QUIET_ZONE_SIZE ; const code = this . encode ( hints , contents ) ; return this . renderResult ( code , width , height , quietZone ) ; }
Writes the QR code to a SVG and renders it in the container.
Writes the QR code to a SVG and renders it in the container .