Coder Social home page Coder Social logo

eduardohachete / pjax-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from falsandtru/pjax-api

0.0 0.0 0.0 6.01 MB

The second generation PJAX for advanced web frameworks.

Home Page: https://falsandtru.github.io/pjax-api/

License: Apache License 2.0

HTML 7.94% CSS 7.47% JavaScript 3.66% TypeScript 80.90% Ruby 0.04%

pjax-api's Introduction

PJAX

CI

The second generation PJAX for advanced web frameworks.

Features

Feature defunkt falsandtru Turbolinks
Concurrency integration X O X
Shadow DOM support X O X
Multiple area update X O O
Fallback area matching X O X
Content type validation X O O
HEAD contents markless auto sync X O X
CSS markless auto sync X O X
Script markless auto load X O X
External script load O O O
Inline script execution X O O
Execution sequence keeping X O X
Non-blocking script load O O O
Subresource integrity checking X O*1 X
Lightweight source rewrite X O O
ETag support X O X
Cache O O O
URL scope X O X
URL scope-based override settings X O X
Browser history fix X O X
Scroll position restoration X O X
NOSCRIPT tag restoration X O X
History API support*2 ? O ?
No jQuery dependency X O ?

*1 Excludes ES modules.
*2 You can use pjax APIs and history APIs in combination.

Documents, APIs, and Demos

https://falsandtru.github.io/pjax-api

Get

CDN

https://www.jsdelivr.com/package/npm/pjax-api

npm

$ npm i pjax-api

Usage

Note that this example specifies the latest version. You have to replace it with any specific version to preserve APIs from breaking changes.

<script src="https://cdn.jsdelivr.net/npm/pjax-api@latest"></script>
<script src="/assets/js/config.js"></script>
// config.js
import Pjax from 'pjax-api';
// or
const { Pjax } = require('pjax-api');

new Pjax({
  areas: [
    // Try the first query.
    '#header, #primary',
    // Retry with the second query when the first query doesn't match.
    '#container',
    // Retry.
    'body'
  ]
});

Browsers

  • Chrome
  • Firefox
  • Safari
  • Edge (Chromium edition only)

pjax-api's People

Contributors

falsandtru avatar newnotmoon avatar staabm avatar sgougi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.