Open
Description
A namespace is needed because your plugin uses a global function.
In the current structure, only window 1depth objects can be registered.
parse: (value, attribute, element) => {
const fn = (() => {
if (typeof window !== "undefined" && value in window) {
// @ts-expect-error
return window[value] // only window 1depth objects can be registered!!
}
if (typeof global !== "undefined" && value in global) {
// @ts-expect-error
return global[value]
}
})()
return typeof fn === "function" ? fn.bind(element) : undefined
},
It would be nice to modify this part so that it can be defined as N depth.
<custom-ele func="action" /> ( O )
<custom-ele func="ns.action" /> ( X )
<custom-ele func="ns.action.get" /> ( X )
Metadata
Metadata
Assignees
Labels
No labels