From 550b6776e17266b81652d2de99a0466954734c9f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 May 2021 09:41:45 +0530 Subject: [PATCH] Dont eval the extra css functions unless needed --- src/pyj/dom.pyj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pyj/dom.pyj b/src/pyj/dom.pyj index 9d955b6da2..13a7aca3a0 100644 --- a/src/pyj/dom.pyj +++ b/src/pyj/dom.pyj @@ -131,12 +131,13 @@ def ensure_id(w, prefix): return ans extra_css = v'[]' - -def add_extra_css(func): - extra_css.push(func()) +add_extra_css = extra_css.push.bind(extra_css) def get_widget_css(): - return extra_css.join('\n') + ans = v'[]' + for func in extra_css: + ans.push(func()) + return ans.join('\n') def set_radio_group_value(parent, name, val):