2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

feat: boost execute function, being able to use arguments

This commit is contained in:
GeoSot
2022-07-01 01:59:32 +03:00
parent 29332a954f
commit ee8fac53d0
5 changed files with 29 additions and 13 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
*/
import { DefaultAllowlist, sanitizeHtml } from './sanitizer'
import { getElement, isElement } from '../util/index'
import { execute, getElement, isElement } from '../util/index'
import SelectorEngine from '../dom/selector-engine'
import Config from './config'
@@ -143,7 +143,7 @@ class TemplateFactory extends Config {
}
_resolvePossibleFunction(arg) {
return typeof arg === 'function' ? arg(this) : arg
return execute(arg, [this])
}
_putElementInTemplate(element, templateElement) {