two snippets with the same name

Suppose I have two snippets with the same name.
(please hold all the WHY WOULD YOU EVER DO THAT!?! comments.. ย if the answer is favorable this will save a lot of time)
One snippet is on page, another is in a static resource.
Which will run first?
Does it depend on the order that they are entered in the builder?
(please hold all the WHY WOULD YOU EVER DO THAT!?! comments.. ย if the answer is favorable this will save a lot of time)
One snippet is on page, another is in a static resource.
Which will run first?
Does it depend on the order that they are entered in the builder?
Tagged:
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
In line snippet wins in a race against static resources.
Thanks!
Karen
FYI on this issue that I posted about a month agoย https://community.skuid.com/skuid/topics/resources-not-emitted-in-order-specified?rfm=1&topic_su.... ย
I'm still waiting on a reply but as I mention in the issue, the order specified in the builder SHOULD matter - but instead it behaves like "it depends" currently and its not documented. ย As Karen mentions, I believe inline snippets will always get loaded after static resources with the current functionality. ย That said, being able to specify order (in order to reliably predict) the exact order things will loadย is critical to proper functioning - especially when you might need to do something in an inline snippet that a static resource then relies on (which wouldn't even be possible today).
Short story - Keep an eye out on the other thread just in case anything changes (which it should IMHO:)).
Suppose I have two snippets with the same name. One is in the ModuleJS static resource that skuid pulls in to all pages in that module. The other is in a static resource that's added declaratively to the page.
Which wins?
Sorry for the delayed response. The static resource added declaratively to the page wins.ย
Karen
Two snippets with the same name, in different static resources added declaritively to the page. If I am correctly understandingย Barry's post here, the static resources are currently being loaded in the order that they are entered in the builder?
But what does that mean in this use case? Does the snippet in the first static resource win, or in the second?
Thanks!
So what ever is evaluated last wins when it comes to name conflicts.
Thanks!
Karen