-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
Discussed this with @rvagg in IRC briefly. Here's the alias I would propose:
bonzo.new = function(tagname) {
return bonzo.create('<'+ tagname +'>');
};It could obviously be implemented more performantly as a direct interface to the DOM, but I think it would be a more intuitive API. The current name create() evokes the native DOM's document.create(), which accepts a tag name, not a tag. So intuitively I always want to write bonzo.create('div'), and not bonzo.create('<div>'). That was perhaps the most recurring hitch in my adjustment to the API, FWIW.
Metadata
Metadata
Assignees
Labels
No labels