Bläddra i källkod

Getting started

Herton 5 år sedan
förälder
incheckning
e48e3081fc
1 ändrade filer med 15 tillägg och 0 borttagningar
  1. 15 0
      rction.js

+ 15 - 0
rction.js

@@ -0,0 +1,15 @@
+/*!
+ * rction v0.1
+ * A lightweight helper function for creating reactive, state-based components and UI
+ * (c) 2020 Herton Fontineli Dantas
+ * MIT License
+ * http://github.com/cferdinandi/reef
+ */
+
+/**
+ * Element.matches() polyfill (simple version)
+ * https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill
+ */
+if (!Element.prototype.matches) {
+	Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
+}