Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rax-embed

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-embed

Embed container for Rax.

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
2
Weekly downloads
 
Created
Source

rax-embed

npm

支持

Web / Weex / 阿里小程序 / 微信小程序 / 字节跳动小程序

描述

内嵌内容容器,在 weex 下为 <web> 实现,在 web 下为 <iframe> <embed> 实现,小程序中实现为<webview>

安装

$ npm install rax-embed --save

引用

import Embed from 'rax-embed';

属性

小程序中使用 webview 实现,默认会全屏覆盖当前页面,不能设置样式和透明度

属性类型默认值必填描述支持
styleobject{}false样式描述browser weex
srcstring''false嵌入的页面地址browser weexminiApp wechatMiniprogram miniApp
urlParamstring/object{}false传递给子页面的参数browser weexminiApp wechatMiniprogram miniApp
page_inside_embedbooleantruefalse页面是否在embed中browser weex
page_home_isweexbooleanfalse子页面的宿主页面是否是 weex 渲染browser 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 });

Keywords

FAQs

Package last updated on 01 Jul 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc