Commit Graph

6 Commits

Author SHA1 Message Date
Robert Lowe
f27bcbb3c4 Adds onReady hook to Spiderable package
Resolves #3824
Adds missing `DDP` dependancy
Adds `callback-hook` for onReady hook registration
Adds some client tests for `Spiderable`
Bumps version to `1.0.8`
2015-04-14 23:32:20 -07:00
Andrew Wilcox
5f1c8f2eeb Add spiderable support for hash fragments
Since the browser application cache appears not to support URL path
routes in a non-buggy way (see
https://github.com/meteor/meteor/pull/2926), applications using the
appcache package will want to use hash fragment routes instead.

This PR adds support to the spiderable package for hash fragment
routes.  An original URL such as `http://example.com/#!a=1&b=2` will
be encoded by a search engine as an escaped fragment, decoded by the
spiderable package, passed through to the phantomjs process, and
appear to the phantom client as `#!a=1&b=2` in `window.location.hash`
(the same as when the original URL is opened in a regular browser).
2015-01-26 15:54:47 -08:00
Sashko Stubailo
41910019e1 Renamed Deps to Tracker in all packages 2014-08-27 20:05:22 -07:00
Justin SB
3ce808aae5 Spiderable now uses a flag to determine when the initial JS has loaded
Other approaches seemed to be heuristics that broke down in edge cases:
a timeout wasn't guaranteed if your JS was slow; page.load in PhantomJS
wasn't firing reliably because of long polling.
2014-08-27 09:46:36 -07:00
MaximDubrovin
6345d92f07 move phantom_script.js setInterval into page.open callback
Until I made this I always got only ```<head/>``` with it's content, ```<body>``` was empty.

It seems setInterval script was finished earlier then url content was loaded to the page. Maybe because I have subscriptions with response time lower then 100ms so they were ready very quickly — database server in the same data center.

http://phantomjs.org/api/webpage/method/open.html
2014-08-01 16:44:04 -07:00
David Glasser
39fc2ac12c Move spiderable phantom script to an asset 2014-07-18 16:45:16 -07:00