(function(Polyfill, $, window) {
  var $window = $(window);
  var vuPattern = /(vmin|vmax|vw|vh|vm)/;
  var pattern = /[\d]+(.\d*?)?(vmin|vmax|vw|vh|vm)/g;

  // Convert viewport-units to their pixel equivalents
  var convertValue = function(vu) {
    var percent = vu.match(/[\d.]+/)[0] / 100;
    var unit = vu.match(vuPattern)[0];

    var width = $window.width();
    var height = $window.height();
    var min = window.Math.min(width, height);
    var max = window.Math.max(width, height);

    switch (unit) {
      case "vh":
        // vh -- 1/100th of the height of the viewport.
        return percent * height + "px";

      case "vw":
        // vw -- 1/100th of the width of the viewport.
        return percent * width + "px";

      case "vm":
      case "vmin":
        // vmin -- 1/100th of the minimum value between the height
        //         and the width of the viewport.
        return percent * min + "px";

      case "vmax":
        // vmax -- 1/100th of the maximum value between the height and
        //         the width of the viewport.
        return percent * max + "px";

      default:
        // Unreachable
    }
  };

  // Gather any propeties containing viewport units
  // and return their converted values
  var convertDecl = function(decl) {
    for (var name in decl) {
      var value = decl[name];

      if (pattern.test(value)) {
        value = value.replace(pattern, function(match) {
          return convertValue(match);
        });

        decl[name] = value;
      } else {
        delete decl[name];
      }
    }

    return decl;
  };

  $(function() {

    var options = {
      keywords: {
        declarations: [
          "*:*vh",
          "*:*vw",
          "*:*vmax",
          "*:*vmin",
          "*:*vm",  // NOTE: 'vm' is 'vmin' in IE9
        ]
      }
    };

    Polyfill(options)
      .doMatched(function(rules) {
        var lines = [];

        // Iterate through each matched rule
        rules.each(function (rule) {

          // Gather the properties and get an object of the declaration
          var decl = rule.getDeclaration();

          // Convert any matched viewport-units in the declaration to their
          // equiv. pixel values
          decl = convertDecl(decl);

          // Push the converted declaration
          lines.push(rule.getSelectors());
          lines.push("{");

          for (var name in decl) {
            lines.push(name + ": " + decl[name] + ";");
          }

          lines.push("}");
        });

        // Build a <style/> element and attach it to <head>/
        var text = lines.join("\n");

        // Append the new style element
        $("head").append("<style type='text/css'>" + text + "</style>");
      });

  });

}(Polyfill, jQuery, window));

@@ -1601,24 +1601,117 @@
 nction() %7B%0A%0A
+    // Hide %3Cbody/%3E for now%0A    $(%22body%22).css(%7B%22visibility%22: %22hidden%22, %22display%22: %22none%22%7D);%0A%0A
     var opti
@@ -1925,43 +1925,41 @@
     
-Polyfill(options)%0A      .doMatched(
+var rules = %5B%5D;%0A    var update = 
 func
@@ -1967,19 +1967,12 @@
 ion(
-rules
 ) %7B%0A
-  
     
@@ -1986,26 +1986,24 @@
 ines = %5B%5D;%0A%0A
-  
       // Ite
@@ -2033,18 +2033,16 @@
 ed rule%0A
-  
       ru
@@ -2077,18 +2077,16 @@
         
-  
 // Gathe
@@ -2131,34 +2131,32 @@
 the declaration%0A
-  
         var decl
@@ -2190,18 +2190,16 @@
         
-  
 // Conve
@@ -2264,18 +2264,16 @@
         
- 
- 
 // equiv
@@ -2287,18 +2287,16 @@
  values%0A
-  
         
@@ -2330,18 +2330,16 @@
         
- 
- 
 // Push 
@@ -2364,34 +2364,32 @@
 aration%0A        
-  
 lines.push(rule.
@@ -2405,34 +2405,32 @@
 ors());%0A        
- 
- 
 lines.push(%22%7B%22);
@@ -2427,26 +2427,24 @@
 push(%22%7B%22);%0A%0A
-  
         for 
@@ -2460,26 +2460,24 @@
  in decl) %7B%0A
-  
           li
@@ -2526,18 +2526,16 @@
         
-  
 %7D%0A%0A     
@@ -2529,34 +2529,32 @@
      %7D%0A%0A        
- 
- 
 lines.push(%22%7D%22);
@@ -2552,34 +2552,32 @@
 ush(%22%7D%22);%0A      
-  
 %7D);%0A%0A        // 
@@ -2571,18 +2571,16 @@
 %0A%0A      
- 
- 
 // Build
@@ -2626,26 +2626,24 @@
 ead%3E/%0A      
-  
 var text = l
@@ -2666,18 +2666,16 @@
 %0A%0A      
- 
- 
 // Appen
@@ -2698,18 +2698,16 @@
 element%0A
-  
       $(
@@ -2768,16 +2768,420 @@
 tyle%3E%22);
+%0A%0A      // Show %3Cbody/%3E again%0A      $(%22body%22).css(%7B%22visibility%22: %22visible%22, %22display%22: %22block%22%7D);%0A    %7D;%0A%0A    Polyfill(options)%0A      .doMatched(function(rules_) %7B%0A        rules = rules_;%0A%0A        // Add a 'resize' listener to update styles%0A        $(window).off('.polyfill-viewport-units');%0A        $(window).on('resize.polyfill-viewport-units', update);%0A%0A        // Update immediately%0A        update();
 %0A      %7D

Handle change on resize (makes it work in firefox on mobile)