saabi/vminpoly

Some question for install?

Opened this issue · 6 comments

Hi,
a small installation manual would be awesome?
Is it necessary to use tokenizer and parser js-files to get it work?
Have I put some JS-Code in my website to initialize this polyfill?

Kind regards

I have just started using vminpoly and taken the exact code from the simple demo and it works on a local LAMP stack. (I am using XAMPP)

  1. Yes you have to use tokenizer.js
  2. Yes you have to use parser.js
  3. Yes you have to include vminpoly.js

You also have to link the CSS inthe head of your HTML document of course.

If you copy the simple demo 1 to 1 to your development environment it should work.
It does so here just fine in native IE8.
If you need more help let me know.

There is quite some difference between the vminpoly in the demo and in the repo. I have just now tried with both and it works with both. I guess it would be best to use the vminpoly downloaded from the repo. Check the pull requests also and perhaps change the files accordingly. Though it does work with the vminpoly from the repo.

What about this function :

if (!Array.prototype.filter)
    {
      Array.prototype.filter = function(fun /*, thisp*/)
      {
        var len = this.length;
        if (typeof fun != "function")
          throw new TypeError();
        var res = new Array();
        var thisp = arguments[1];
        for (var i = 0; i < len; i++)
        {
          if (i in this)
          {
            var val = this[i]; // in case fun mutates this
            if (fun.call(thisp, val, i, this))
              res.push(val);
          }
        }
        return res;
      };
    }

?

What are you trying to do with this function?

I just like to know if I need it :) I have no clue what it is used for in the example, or should be adding:

  • Yes you have to use tokenizer.js
  • Yes you have to use parser.js
  • Yes you have to include vminpoly.js

enough ?

Sorry for not getting back to your earlier!!

Are you able to copy the demo and get it working on your end?

Just copy the demo to your local dev environment and let me know if you can get it to work.

I copied the demo as is one to one and it works fine out of the box. What else are you doing?

Just use tokenizer.js, parser.js and vminpoly.js and you are ready to go.