소스 검색

Getting started

Herton 5 년 전
부모
커밋
e48e3081fc
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  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;
+}