-
Notifications
You must be signed in to change notification settings - Fork 36
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
Call DOM altering functions after snippet finishes initializing. #123
Conversation
// Add sample rate and snippet ID to currently displayed links. | ||
var parameters = ('sample_rate=' + SNIPPET_METRICS_SAMPLE_RATE + '&snippet_name=' + | ||
show_snippet_id); | ||
modifyLinks(topSection.getElementsByTagName('a'), parameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seeing we know we will always be in Fx only, I would do:
...(topSection.querySelectorAll('a'),....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is querySelectorAll
a Fx only feature? Is this faster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not Fx only, all modern browsers support it and yes, unless you are doing getElementById
it is faster.
74d999e
to
813acac
Compare
@schalkneethling do you have any other comments on this? Reading your comments on mozmeao/snippets#53 if you can use the close button on the logo it means that this works as expected for you. |
r+ 🀄 |
I do not have big green button access so, merge at will. |
Thanks! |
Call DOM altering functions after snippet finishes initializing.
No description provided.