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

rax-embed

Package Overview
Dependencies
Maintainers
1
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.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm

描述:

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

安装

$ npm install rax-embed --save

引用

import Embed from 'rax-embed';

属性

注: 1、支持列表中的 browser代表h5 weex代表weex miniApp代表小程序 2、小程序中使用webview实现,默认会全屏覆盖当前页面,不能设置样式和透明度

属性类型默认值** 必填 **描述** 支持 **
styleObject{}false样式描述browserweex
srcString''false嵌入的页面地址browserweexminiApp
urlParamString or Object''false传递给子页面的参数browserweex
page_inside_embedbooleantruefalse页面是否在embed中browserweex
page_home_isweexbooleanfalse子页面的宿主页面是否是 weex 渲染browserweex

示例

在线 Demo

import {createElement, render, Component} from 'rax';
import * as DriverDOM from 'driver-dom';
import * as DriverWeex from 'driver-weex';
import { isWeex } from 'universal-env';
import Embed from '../src/index';

const urlParam = {
  paramOne:123,
  paramTwo:456
};
render(<Embed urlParam={urlParam} src={'http://taobao.com'} useIframeInWeb={true} style={{
  height: 750,
  width: 750
}} />, document.body, { driver:isWeex ? DriverWeex : DriverDOM });

Keywords

FAQs

Package last updated on 30 Jul 2019

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