@lynx-js/web-core-canary
v0.26.1
Published
The Web Platform of Lynx / Lynx for Web
Readme
@lynx-js/web-core
Lynx3 Web Platform runtime core
Usage
use an open CDN
unpkg
<script src="https://app.unpkg.com/@lynx-js/web-core/files/dist/client_prod/static/js/client.js" type="module"></script>
<link rel="stylesheet" href="https://app.unpkg.com/@lynx-js/web-core/files/dist/client_prod/static/css/client.css">jsdelivr
<script src="https://cdn.jsdelivr.net/npm/@lynx-js/web-core/dist/client_prod/static/js/client.js" type="module"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lynx-js/web-core/dist/client_prod/static/css/client.css">bundle with your project
import '@lynx-js/web-core/client';
document.body.innerHTML = `
<lynx-view
style="height:100vh; width:100vw;"
url="http://localhost:3000/main/main-thread.js"
>
</lynx-view>`;Enable mouse-drag scrolling
To make <scroll-view> respond to mouse dragging like a touchscreen, import
the optional plugin before the client:
import '@lynx-js/web-core/plugins/scroll-view-mouse-drag';
import '@lynx-js/web-core/client';The plugin only changes <scroll-view> and leaves native touch scrolling
unchanged.
To enable <animax-view>, install @lynx-js/animax and import the opt-in
side-effect entry:
import '@lynx-js/web-core/animax';Document
See our website for more information.
