Dont eval the extra css functions unless needed

This commit is contained in:
Kovid Goyal 2021-05-20 09:41:45 +05:30
parent 9948e2dafa
commit 550b6776e1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -131,12 +131,13 @@ def ensure_id(w, prefix):
return ans return ans
extra_css = v'[]' extra_css = v'[]'
add_extra_css = extra_css.push.bind(extra_css)
def add_extra_css(func):
extra_css.push(func())
def get_widget_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): def set_radio_group_value(parent, name, val):