Coder Social home page Coder Social logo

Comments (6)

ded avatar ded commented on July 20, 2024

can you give an example? there's probably a very good reason — if not simply for the sake of speed, and that doing this via Ender would do it anyway.

from bonzo.

rvagg avatar rvagg commented on July 20, 2024

@ded I was discussing this with @adlwalrus and I couldn't come with a good reason that bonzo() isn't more clever and wondered if there was something I was overlooking.

bonzo(bonzo.create('<p>')).appendTo('#something') // unnecessarily awkward

The manip methods are clever enough to normalize() & query(), the constructor should probably be too, for Bonzo stand-alone. There's already a typeof elements == 'string' check in there but it doesn't do anything sensible.

That, and the fact that bonzo.create() doesn't return a Bonzo collection.

from bonzo.

ded avatar ded commented on July 20, 2024

hmmm.... i suppose so... we'd have to bump up the package a minor version tho

from bonzo.

ded avatar ded commented on July 20, 2024

and update a few tests...

from bonzo.

aawwawa avatar aawwawa commented on July 20, 2024

Anyone wanna do it? If not, then anyone wanna coach me through doing it?

from bonzo.

aawwawa avatar aawwawa commented on July 20, 2024

Well that was silly... how does this look? #103

(I had a look over the tests to see if there were any I could clearly identify as needing to be updated, but it appears not.)

(Also, I'm still not sure what @rvagg was talking about with query() after poking around in the sources. I assume it has to do with being able to pass a selector into the constructor, but I'm not sure.)

from bonzo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.