Commit Graph

8 Commits

Author SHA1 Message Date
Behind The Math
39a96e51e7 Add tests 2018-04-09 23:31:04 -04:00
Behind The Math
f3dd755a97 Fix and refactors tests 2018-04-09 23:31:03 -04:00
Behind The Math
ee82d0e0c7 Fix bug when checking if elements were parsed already
parse-element.js checks if the element was already parsed by
checking for the `data-pjax-click-state` attribute. However, this
attribute was not added until the link is clicked.

Originally, there was a separate attribute, `data-pjax-enabled`,
which tracked if the element was parsed already, but that was
changed in 9a86044.

This commit merges the attributes for mouse clicks and key presses
into one and adds that attribute when the element is initially
parsed.
2018-04-09 23:31:02 -04:00
BehindTheMath
a72880d205 Code cleanup (#120)
* Lots of code cleanup

* Cleanup parse-options tests
  - Rename objects for clarity and inline unneeded objects
  - Remove unneeded tests
  - Use Object.keys().length instead of a custom function
  - Use typeof === "object" instead of a custom function that checks the prototype tree as well, since we don't expect anything but an object literal.

* Remove old switchFallback code

* Remove polyfill for Function.prototype.bind

* Inline small functions

* Add more documentation and tests for options.currentUrlFullReload
  Closes #17

* Update package.json
2018-02-02 09:52:44 -05:00
Tim Trinidad
f196604d73 Add tests to ensure options are not accidentally modified 2018-01-23 13:22:48 -05:00
darylteo
791400ed20 Tests for #5 2016-01-04 23:45:25 +11:00
Peter Lada
9a86044f90 changed existing refresh method to reload. changed the data check to trigger a refresh on the element based on the already bound data attr 2015-01-28 18:27:16 -08:00
Maxime Thirouin
165532d43c Relocate all the things 2014-10-14 08:23:56 +02:00