minddust / jquery-pjaxr Goto Github PK
View Code? Open in Web Editor NEWPushstate aJAX eXtended Replacements
Home Page: www.minddust.com/project/jquery-pjaxr
License: MIT License
Pushstate aJAX eXtended Replacements
Home Page: www.minddust.com/project/jquery-pjaxr
License: MIT License
That would be awesome!
IE doesn't know about absolute url while creating link elements with a relative string. The protocol will be ":" and the hostname empty. Because of that the IE don't pass the cross origin check here:
https://github.com/minddust/jquery-pjaxr/blob/master/jquery.pjaxr.js#L32
Pjax project is being actively developed and improved. I think this project should try to stay as close to the parent project as possible and gain from all the improvements made upstream. I'll go through the source as soon as I have a breather (a few days) and see if I can help with that.
the script will brick when reloading the page and going back in history.
in onPjaxRPopstate it tries to fire an event but dont have a related target set.
an uncaught typeerror occurs and the script stops.
When passing a metatag like
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
it should be ignored instead of raising error because actual element is undefined on line 263
The original pjax library has the capability to send forms.
In searching for a solution to be able to update multiple parts of the DOM I came across your library and it appears to be just what I need.
I noticed that your port does not currently handle forms and was wondering if you have plans to implement this feature or perhaps there are reasons you intentionally left it out?
A namespace declaration such as
<pjaxr-namespace>
X.Y.Z
</pjaxr-namespace>
should be interpreted as:
<pjaxr-namespace>X.Y.Z</pjaxr-namespace>
In case of templating engines, inserting newLines, tabs etc. to beautify Tags
Script injection via pjaxr is not possible with jquery 1.8.3, require jquery >= 1.9?
With only one method it would be a lot easier to register methods on page load... on pjaxr or initial requests.
The use of locationReplace in pjaxr is correct, if you have already pushed the new state, but then realizing you have to get the whole page.
If you fail to get the request by the server, it should be a Location.href or Location.assign() to push the new site to the statestack.
We need a fallback for pjaxr, to recognize when it requested a non-pjaxr site in the same domainspace, even if this site has no pjaxr too.
It would be nice to inject a function into the state before pjaxr decided to change Location with locationReplace. This function checks if pjaxr is currently enabled and then intially requests (without pjaxr) the site.
Another solution would be a Fallbackscript delivered by the Server at every request.
It could be useful to implement a signal for javascript to recognize that the user clicked the browser's back button, or triggered a history.go(-X).
Hi Stephan,
I tried to run your examples and test locally, but somehow -following your instructions on the website- doesn't work:
$ git clone https://github.com/minddust/jquery-pjaxr.git
$ cd jquery-pjaxr/
$ python ./tests/app.py
$ phantomjs ./tests/run-qunit.js "http://localhost:5000/"
Flask and Phantomjs are installed.
Thank you!
Invalid scripts bricking pushstates...
What about catching the error and bringing their message to log?
As shown in #34 data-remove-on-pjaxr not working in body, only as child of head.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.