Doing so reveals a deadlock in the stop code (which causes self-test to
fail, yay). Fix it by trying harder to not stop the (all or app) runner
until after the app runner has processed the "hey you should stop"
return false from onRunEnd.
Now any plugin can request that its files be treated as "templates" by
setting an isTemplate flag.
(This API is just as supported as you'd expect based on the fact that
you still can't access it without calling a function which starts with
"_transitional_".)
Tested by renaming leaderboard.js to a.js and confirming that it still
works (and that it *doesn't* if templating does not set isTemplate).
If you happen to introduce a circular require into the stack, this
object will be undefined.
Instead, hang on to `require('./run-log.js')`, which is the exports
module which does get filled in later.
Use heartbeatInterval: 0 to disable heartbeats for testing.
No need to add `_internal` to the public connection API because we
can get to the internal session through the server.
Add "ping" and "pong" messages to DDP. This allows us to detect at
the DDP level when we've lost the connection.
Bump the DDP version to "pre2". Preserve backwards compatibility by
not enabling pings if the negotiated DDP version is an earlier version.
Since receiving a ping indicates that the connection is alive, one
side of the connection doesn't have to send its own pings as long as
its receiving pings from the other side. The ping interval defaults
to 30 seconds on the server and 35 seconds on the client, which means
that normally the pings go just one way (saving on bandwidth).
Increase the sockjs heartbeats from 25s to 45s, so they do not
normally fire.
Convert relative urls to absolute url when merging CSS files
Fixes issues introduced in `css-minification` branch in development mode and caused by concatenation in general.
When a stylesheet refers to an asset by a relative url, the relative url becomes invalid after concatenation if the stylesheet was originally located somewhere nested.
Background: When browsers parse HTML, they always insert a <tbody> around your <tr>s if you don't have one. That is, `<table><tr>` becomes `<table><tbody><tr>`. However, if you use the DOM API (appendChild et al.), this doesn't happen. According to the latest specs and modern browsers, the TBODY element is not necessary in the DOM (though it is still always inserted when parsing HTML). IE 6/7 disagrees, but that's history. jQuery bends over backwards to insert TBODY elements dynamically, whenever you put a TR inside a TABLE. Previously, we did too, but it's even harder for us.
This commit removes the code that special-cases tables in DomRange. The code was never completely finished, and it will slow us down to have the extra essential complexity in DomRange. Now, when you write `<table><tr>`, you'll get `<table><tr>` in the DOM tree.
It's important that we never optimize `<table><tr>...` into innerHTML, or else a template like `<table><tr><td>Foo</td></tr></table>` will get an inserted TBODY, while the same template with `{{foo}}` instead of `Foo` won't (because the table can't be optimized into static HTML). A new test checks that we do this right.
The main downside of this change is that jQuery isn't as good for manipulating tables created by Meteor. However, I think we can live with that. jQuery made a particular choice there, and any problems that come up will be consistent across browsers and have workarounds (like inserting a <tbody> or not using a <table> tag).
Another downside concerns server-side rendering. Rendering a template to a complete HTML string containing `<table><tr>` and then splatting that into the page will produce <tbody> tags that wouldn't be there if the page were rendered on the client. We'll cross that bridge when we come to it. In most ways (e.g. CSS rules), it shouldn't matter if there are <tbody> tags or not.
- Depend on ui in webapp because we use UI.component
- Use eval rather than new Function because we *do* need the local
environment (to get HTML, UI, etc)
- Log errors from running the template
These issues were not visible in normal apps because normal apps use
'ui' (implied by standard-app-packages) which makes UI a *global*. Ditto
for 'htmljs' (implied by ui) and the HTML symbol.
This wouldn't work well if you run from a Meteor checkout or
without updating your app (via `meteor run --release 0.8.0`)
This reverts commit dc71bd2143.