Sha256: a7d0ced581350fd070cbf03f0d483fac2d2921fd32c7a38685f249252e6683a5

Contents?: true

Size: 407 Bytes

Versions: 6

Compression:

Stored size: 407 Bytes

Contents

"use strict";

var ko = require("knockout");

/* https://github.com/knockout/knockout/issues/1171 */
ko.bindingHandlers.cssText = {
  'update': function(node, valueAccessor, allBindings) {
    var text = ko.utils.unwrapObservable(valueAccessor());
    try {
      node.innerText = text;
    } catch (e) {
      if (!node.styleSheet) node.innerHTML = "a{}";
      node.styleSheet.cssText = text;
    }
  }
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mosaico-2.0.0 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js
mosaico-1.1.1 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js
mosaico-1.1.0 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js
mosaico-1.0.2 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js
mosaico-1.0.1 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js
mosaico-1.0.0 vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js