
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
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.
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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.