Sha256: da787dde8099259bad2b0c5a31bb51a28cb11041cb7990a8176c83c574d4ff80

Contents?: true

Size: 885 Bytes

Versions: 23

Compression:

Stored size: 885 Bytes

Contents

/*
 * Parses the Protovis specifications on load, allowing the use of JavaScript
 * 1.8 function expressions on browsers that only support JavaScript 1.6.
 *
 * @see pv.parse
 */
pv.listen(window, "load", function() {
   /*
    * Note: in Firefox any variables declared here are visible to the eval'd
    * script below. Even worse, any global variables declared by the script
    * could overwrite local variables here (such as the index, `i`)!  To protect
    * against this, all variables are explicitly scoped on a pv.$ object.
    */
    pv.$ = {i:0, x:document.getElementsByTagName("script")};
    for (; pv.$.i < pv.$.x.length; pv.$.i++) {
      pv.$.s = pv.$.x[pv.$.i];
      if (pv.$.s.type == "text/javascript+protovis") {
        try {
          window.eval(pv.parse(pv.$.s.text));
        } catch (e) {
          pv.error(e);
        }
      }
    }
    delete pv.$;
  });

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rubyvis-0.6.0 vendor/protovis/src/lang/init.js
rubyvis-0.5.2 vendor/protovis/src/lang/init.js
rubyvis-0.5.1 vendor/protovis/src/lang/init.js
rubyvis-0.5.0 vendor/protovis/src/lang/init.js
rubyvis-0.4.1 vendor/protovis/src/lang/init.js
rubyvis-0.4.0 vendor/protovis/src/lang/init.js
rubyvis-0.3.6 vendor/protovis/src/lang/init.js
rubyvis-0.3.5 vendor/protovis/src/lang/init.js
rubyvis-0.3.4 vendor/protovis/src/lang/init.js
rubyvis-0.3.3 vendor/protovis/src/lang/init.js
rubyvis-0.3.2 vendor/protovis/src/lang/init.js
rubyvis-0.3.1 vendor/protovis/src/lang/init.js
rubyvis-0.3.0 vendor/protovis/src/lang/init.js
rubyvis-0.2.2 vendor/protovis/src/lang/init.js
rubyvis-0.2.1 vendor/protovis/src/lang/init.js
rubyvis-0.2.0 vendor/protovis/src/lang/init.js
rubyvis-0.1.7 vendor/protovis/src/lang/init.js
rubyvis-0.1.6 vendor/protovis/src/lang/init.js
rubyvis-0.1.5 vendor/protovis/src/lang/init.js
rubyvis-0.1.4 vendor/protovis/src/lang/init.js