Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Web / Weex / 阿里小程序 / 微信小程序 / 字节跳动小程序
内嵌内容容器,在 weex 下为 <web>
实现,在 web 下为 <iframe>
<embed>
实现,小程序中实现为<webview>
。
$ npm install rax-embed --save
import Embed from 'rax-embed';
小程序中使用 webview 实现,默认会全屏覆盖当前页面,不能设置样式和透明度
属性 | 类型 | 默认值 | 必填 | 描述 | 支持 |
---|---|---|---|---|---|
style | object | {} | false | 样式描述 | |
src | string | '' | false | 嵌入的页面地址 | |
urlParam | string/object | '' | false | 传递给子页面的参数 | |
page_inside_embed | boolean | true | false | 页面是否在embed中 | |
page_home_isweex | boolean | false | 子页面的宿主页面是否是 weex 渲染 |
import { createElement, render } from 'rax';
import DriverUniversal from 'driver-universal';
import Embed from '../src/index';
const urlParam = {
paramOne: 123,
paramTwo: 456
};
render(<Embed urlParam={urlParam} src={'http://taobao.com'} useIframeInWeb={true} style={{
height: '750rpx',
width: '750rpx'
}} />, document.body, { driver: DriverUniversal });
FAQs
Embed container for Rax.
The npm package rax-embed receives a total of 9 weekly downloads. As such, rax-embed popularity was classified as not popular.
We found that rax-embed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.