From c443011e4604e291a0e07a50aace45839c27f4c3 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 25 Mar 2013 10:33:32 -0400 Subject: [PATCH 1/2] Clarify Meteor.startup documentation. Fixes #831. --- docs/client/api.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index c81d3abfb4..0b56f8e9c2 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -16,8 +16,20 @@ on the client, just on the server, or *Anywhere*. On a server, the function will run as soon as the server process is finished starting. On a client, the function will run as soon as the DOM -is ready and any `` templates from your `.html` files have been -put on the screen. +is ready. + +The `startup` callbacks are called in the same order as the calls to +`Meteor.Startup` were made. + +On a client, `startup` callbacks from smart packages will be called +first, followed by `` templates from your `.html` files, +followed by your application code (since this is the order in which +code is loaded). + +Because of this ordering, in a `startup` callback from your +application code the `` templates will have been put on the +screen already, while in a `startup` callback from a smart package +they won't have been inserted yet. // On server startup, if the database is empty, create some initial data. if (Meteor.isServer) { From a2485a85fc893525e63d24e96d38d975db70e11c Mon Sep 17 00:00:00 2001 From: Chris Mather Date: Tue, 26 Mar 2013 14:17:16 -0700 Subject: [PATCH 2/2] minor wordsmithing --- docs/client/api.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index 0b56f8e9c2..fcd7a5fc60 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -23,13 +23,7 @@ The `startup` callbacks are called in the same order as the calls to On a client, `startup` callbacks from smart packages will be called first, followed by `` templates from your `.html` files, -followed by your application code (since this is the order in which -code is loaded). - -Because of this ordering, in a `startup` callback from your -application code the `` templates will have been put on the -screen already, while in a `startup` callback from a smart package -they won't have been inserted yet. +followed by your application code. // On server startup, if the database is empty, create some initial data. if (Meteor.isServer) {