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

Do not read/write DOM outside of $(document).ready #52

Open
eliemichel opened this issue Mar 7, 2015 · 4 comments
Open

Do not read/write DOM outside of $(document).ready #52

eliemichel opened this issue Mar 7, 2015 · 4 comments

Comments

@eliemichel
Copy link
Member

Guidelines are meant to remain open issues, just for contributors information.

The Black Box pattern used in Views.py is a little bit weird.

For instance, header is built as soon as the file is loaded and its construction calls $('#app-bar a') which requires the DOM to be fully loaded.

Actually, using foo = (function() { return 'bar' })() seems strictly equivalent to foo = bar for me. This trick can be used when you need the whole file to be read before starting to execute it or to limit the scope of some variables but here it is not the goal.

You may read the Black Box guideline again.

@Phyks
Copy link
Member

Phyks commented Oct 4, 2015

still an issue?

@Phyks
Copy link
Member

Phyks commented Oct 7, 2015

@eliemichel
Copy link
Member Author

Indeed, I was thinking about it too, although I don't know its support.

@Phyks
Copy link
Member

Phyks commented Oct 8, 2015

According to last page, it is widely supported.

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

No branches or pull requests

2 participants