Skip to content

Fixes issue #513 #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

AurelioDeRosa
Copy link
Member

No description provided.

@RedWolves
Copy link
Member

I'm not sure I agree with the wording here. I'd rather see something about how constantly manipulating the DOM is an expensive operation and by creating an internal reference and working with that reference and touching the DOM once at the end when we append it to the container we're being considerate of the performance considerations.

@gnarf
Copy link
Member

gnarf commented Dec 23, 2014

See also #560, basically right now we've got nothing separating the bad example and the rewritten version, and I think the actual intent with this second example there is to abstract the setting that would be set.

I would kind of like to see the example be rewritten such that we use a class instead of an ID (for both the bad and good version).

We should also include a section as @RedWolves described, or rewrite the bad version such that It also stores the created div (to not need to then talk about that optimization)

Considering the title this section is under is Give Full Control of Elements I think we should focus on only that improvement though.

Willing to take on these changes and updates @AurelioDeRosa ?

@arthurvr
Copy link
Member

arthurvr commented Jan 3, 2015

ping @AurelioDeRosa about the above.

Also, for the reference: this would close #560 too.

@AurelioDeRosa
Copy link
Member Author

Hi @gnarf and @arthurvr.

I'd like to update the PR to take all the opinions expressed here into account. So, to summarize, the page should be updated to clearly separate the bad example from the good example. In regard of the proposal to show an example using the ID selector vs the class selector I don't see much value for the readers. I mean that the performance are different but in that specific discussion I don't see the value of showing the same example twice with a different selector.

Any idea?

@gnarf
Copy link
Member

gnarf commented Jan 6, 2015

I think both examples (even the "bad" case) should use classes instead of ID, and "cache" the selection, making the only "improvement" settings.wrapperAttrs

@gnarf
Copy link
Member

gnarf commented Jan 6, 2015

or in other words, "giving control over the element"

Updated PR based on comments
@AurelioDeRosa
Copy link
Member Author

@gnarf and @arthurvr I've updated the PR based on the discussion here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants