How to use the blob-polyfill.Blob function in blob-polyfill

To help you get started, we’ve selected a few blob-polyfill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dblarremore / webweb / client / js / webweb.v6.js View on Github external
'save-svg': () => {
          var svg = _this.canvas.svgDraw()
          const title = _this.state.global.settings.networkName
          svg.setAttribute("title", title)
          svg.setAttribute("version", 1.1)
          svg.setAttribute("xmlns", "http://www.w3.org/2000/svg")

          try {
            var isFileSaverSupported = !!new Blob()
            var blob = new Blob([svg.outerHTML], {type: "image/svg+xml"})
            saveAs(blob, title);
          } catch (e) {
            alert("can't save :(")
          }
        },
        'save-canvas': (settings) => {
github dblarremore / webweb / client / js / webweb.v6.js View on Github external
'save-svg': () => {
          var svg = _this.canvas.svgDraw()
          const title = _this.state.global.settings.networkName
          svg.setAttribute("title", title)
          svg.setAttribute("version", 1.1)
          svg.setAttribute("xmlns", "http://www.w3.org/2000/svg")

          try {
            var isFileSaverSupported = !!new Blob()
            var blob = new Blob([svg.outerHTML], {type: "image/svg+xml"})
            saveAs(blob, title);
          } catch (e) {
            alert("can't save :(")
          }
        },
        'save-canvas': (settings) => {

blob-polyfill

Blob.js implements the W3C Blob interface in browsers that do not natively support it.

MIT
Latest version published 3 months ago

Package Health Score

69 / 100
Full package analysis

Popular blob-polyfill functions