Skip to content
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

Few micro changes and optimizations from various authors #2

Closed
wants to merge 8 commits into from
Closed

Few micro changes and optimizations from various authors #2

wants to merge 8 commits into from

Conversation

voituk
Copy link
Contributor

@voituk voituk commented Oct 26, 2010

Here is few changes in this batch:

  1. Fixed bug in hash:changed event implementation
  2. Cookie code optimizations from Victor Homaykov
  3. Documentation micro-fix
  4. Element.centerInParent implementation from some guy from Mexico.

Any comments? Objections?

voituk and others added 7 commits October 4, 2010 09:41
…her element, given that the container is relatively positioned and has defined dimentions, although this would mean that the element to be centered within another should be moved in the context of the mark up. Ha ve to do that later and refine the method.
@kangax
Copy link
Owner

kangax commented Dec 3, 2010

Thanks for tackling these :) Few comments:

  • What was the bug in hash:changed? Is it trailing ().call(null) part?
  • What is cookie code optimized for? Size? Does it also fix something? find + startsWith could make it slow (for long strings or those consisting of many values)
  • Element#centerInParent sets style "manually"; could use Element.setStyle. I don't care much which one it is; depends on whether size matters more than speed or vice versa (so should be modified accordingly)

@voituk
Copy link
Contributor Author

voituk commented Dec 4, 2010

Oh, it was so much time ago, so i don't remember all details :)
Anyway will try to describe you:

  • Fixed hash_changed typos prevented the snippet to work.
    https://github.com/voituk/protolicious/commit/f7b660d
    There was a typo: you've initialized the hash variable, but current variable was used in the code above
  • I've removed the trailing .call(null) block because you're calling it on result of top-level function, that is not returning the function in fact. So the browser displays error message.
  • Yeah, the cookie code was optimized for size. I haven't tested it's performance, so i don't know which version will be faster. I think you know better than me which one version is good.
  • Element#centerInParent - fixed in c60f39b

@voituk voituk closed this Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants