You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a place to drop ideas for the next version of dom-create-element
I've been using this module a lot and notices a few use cases where the API could be better.
As of one of the first todo is using cleaner options: the first parameter should be the selector, followed by an object.
Breaking changes! As of now, we're adding classes to the element with the styles option. I'd like to update this to classes; this will allow us to also specify inline styles for the element.
If the element selector is an image, we could provide onload / onerror functions. We could drop completely the lazyload option as it's not really used and could be done manually.
Here's a place to drop ideas for the next version of
dom-create-element
I've been using this module a lot and notices a few use cases where the API could be better.
As of one of the first todo is using cleaner options: the first parameter should be the selector, followed by an object.
options.styles
Breaking changes! As of now, we're adding classes to the element with the
styles
option. I'd like to update this toclasses
; this will allow us to also specify inline styles for the element.options.position
If the parent is specified in the options, we can use another option to decide either doing appendChild of prependChild.
options.onload
If the element selector is an image, we could provide onload / onerror functions. We could drop completely the
lazyload
option as it's not really used and could be done manually.The text was updated successfully, but these errors were encountered: