From 07725994b9f22dd62bd8aed314319f106d1b87cd Mon Sep 17 00:00:00 2001 From: metacryst Date: Sun, 5 May 2024 15:47:38 -0500 Subject: [PATCH] add fontSize custom func --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index cba9193..c8efb82 100644 --- a/index.js +++ b/index.js @@ -720,6 +720,12 @@ HTMLElement.prototype.height = function(value, unit = "px") { return this } +HTMLElement.prototype.fontSize = function(value, unit = "px") { + this.style.fontSize = value + unit + Registry.initReactivity(this, ["style", "fontSize"], value); + return this +} + function checkStyle(el) { let computed = window.getComputedStyle(el).position if(!(computed === "absolute" || computed === "fixed")) {