-
Notifications
You must be signed in to change notification settings - Fork 333
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
Fixes script loading order. #144
Conversation
It's great to see all the contributions coming from you, thanks a lot! :) I think the main changes make a lot of sense. We might as well do the same for RCSS if it is not too much trouble. I'm only a bit worried about the ElementDocument API changes though. I know this will break implementations for some users. I'll leave it open a bit for people to chime in. |
Source/Core/DocumentHeader.cpp
Outdated
{ | ||
if (s.line) | ||
{ | ||
target.push_back(s); |
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.
Hm, makes me think, what is the meaning of line
when we merge two headers? It will probably refer to the wrong source file. I think this is only a problem for templates with scripts which is probably unusual. But still, we should probably test this.
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.
Yes, I tested this and there are some bugs in the error message.
Thanks a lot! Looks good to me. I discovered some issues when loading the VisualTests. It looks like this is due to some quirks in how the style sheet cache worked and not related to your code, these changes merely exposed them. I'll merge this as soon as I have a fix for this. |
Thanks again! |
@mikke89 Can you merge this PR into the |
Sure, done! |
This change fixes the loading order of inline script and external script.
Before output:
2
1
3
After output:
1
2
3
I noticed that RCSS has the same problem, but I am not sure if RCSS needs to be modified.
In addition, I added line number information to the inline script, which will make the debug information more friendly.