![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@tiaod/weapp-polyfill
Advanced tools
Polyfills for w3c API on top of Weapp API, including:
微信小程序设计了一系列 IO 相关的 API,但社区中现存的模块绝大部分使用的是 w3c 标准的 API。本项目通过 polyfill 这些 w3c API 允许开发者在不修改第三方模块代码的情况下直接在小程序中使用这些模块。
npm i weapp-polyfill -D
如果你的应用或 SDK 使用打包工具(打包成一个文件后再导入微信开发工具使用),你可以在程序入口的最开始 auto polyfill 所有 API
require('weapp-polyfill/auto-polyfill');
即可在整个项目中直接使用浏览器 API。See a realworld demo。
weapp-polyfill pacakge 本身 export 了以下对象:
const {
XMLHttpRequest,·
FormData,
WebSocket,
localStorage,
polyfill,
} = requrie('weapp-polyfill');
不支持不使用打包工具直接在微信开发工具使用。
由于微信 API 的限制,polyfill 的 API 有以下限制:
getResponseHeade('content-type')
始终返回 'application/json'
,其他 key 始终返回 ''
HEADERS_RECEIVED
与 LOADING
状态uri
属性的对象,uri
的值为通过微信 API 得到的本地临时文件路径:{ uri: 'tempFilePath' }
FAQs
Browser API polyfill for Weapp
The npm package @tiaod/weapp-polyfill receives a total of 0 weekly downloads. As such, @tiaod/weapp-polyfill popularity was classified as not popular.
We found that @tiaod/weapp-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.