How to Embed Web Pages in Mini-Programs Using the Web-View Component

Developers can now flexibly embed web pages within mini-programs using the web-view component, which fills the entire page as a container, though it currently excludes personal and overseas mini-program types, and the guide shows the required WXML markup to set the source URL.

JavaScript
JavaScript
JavaScript
How to Embed Web Pages in Mini-Programs Using the Web-View Component

To allow developers flexible configuration of mini-programs, the ability to embed web pages inside mini-programs is now open.

The web-view component serves as a container for web pages and automatically fills the entire mini-program page.

Personal and overseas mini-program types are not supported yet.

Usage:

<ol><li><code><!-- wxml --></code></li><li><code><!-- Point to the WeChat public platform homepage with web-view --></code></li><li><code><web-view src="https://mp.weixin.qq.com/"></web-view></code></li></ol>
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

frontendEmbeddingWeChatmini-programweb-view
JavaScript
Written by

JavaScript

Provides JavaScript enthusiasts with tutorials and experience sharing on web front‑end technologies, including JavaScript, Node.js, Deno, Vue.js, React, Angular, HTML5, CSS3, and more.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.