Hangzhou (🇨🇳), 05 September 2025
Based on System’s WebView (or Tencent’s X5 WebView) or React Native WebView
<View className='at-article'>
<View className='at-article__h1'>
这是一级标题这是一级标题
</View>
<View className='at-article__info'>
2017-05-07 这是作者
</View>
<View className='at-article__content'>
<View className='at-article__section'>
<View className='at-article__h2'>这是二级...</View>
<View className='at-article__h3'>这是三级...</View>
<View className='at-article__p'>
这是文本段落。这是文本段落。这是文本段落...
</View>
<View className='at-article__p'>这是文本段落</View>
<Image className='at-article__img' src='https...'/>
</View>
</View>
</View>
<div class="taro_page" style="min-height: 100%;">
<div class="page">
<div class="doc-header">
<div class="doc-header__title">Article 文章</div>
</div>
<div class="doc-body">
<div class="panel">
<div class="panel__title">示例</div>
<div class="panel__content no-padding">
<div class="at-article">
<div class="at-article__h1">这是一级标题这是一级标题</div>
<div class="at-article__info">2017-05-07 这是作者</div>
<div class="at-article__content">
<div class="at-article__section">
<div class="at-article__h2">这是二级标题</div>
<div class="at-article__h3">这是三级标题</div>
<div class="at-article__p">这是文本段落。</div>
<div class="taro-img"><img class="taro-img" src="http...">
</div>
...
<div class="panel">
<div class="panel__title">Custom colors</div>
<div class="panel__content">
<div class="example-item">
<div class="at-timeline">
<div class="at-timeline-item">
<div class="at-timeline-item__tail"></div>
<div class="at-timeline-item__dot"></div>
<div class="at-timeline-item__content">
<div class="at-timeline-item__content-item">
Brush your teeth and wash your face
</div>
</div>
</div>
<div
class="at-timeline-item at-timeline-item--green">
...
<div class="at-divider">
<div class="at-divider__content"
style="color: red;">
No more
</div>
<div class="at-divider__line"
style="background-color: red;">
</div>
</div>
Examples simplified for readability.
Not optimal for:
W3C Core Standards are optimal for:
In 2021, Taro proposed an RFC on common usage of markup to benefit of the directly use of HTML5 standards.
We hope to reduce the cost of migrating [HTML5] applications to Mini Programs, and even run them directly in Mini Programs
| HTML elements | Mini Program components | Difference in attributes |
|---|---|---|
| Block-level text | view | |
| Inline text | text | |
| span | view | |
| img | image | |
| a | navigator | href ->url; target ->openType |
| input | input | autofocus ->focus; readonly ->disabled; ... |
| input["type=checkbox"] | checkbox | |
| input["type=radio"] | radio | |
| button | button | type=submit ->form-type=submit ... |
| textarea | textarea | |
| progress | progress | value, max ->percent |
| label | label | |
| form | form | |
| audio | audio | |
| canvas | canvas | |
| video | video | |
| iframe | web-view | |
| slot | slot |
Why not use existing (mature) standards?
See the standards gap analysis of MiniApp APIs and MiniApp elements.
| Type | API | Description | #1 | #2 | #3 | #4 | 2+ | Standard |
|---|---|---|---|---|---|---|---|---|
| Data management | Data storage | Get, set key=value pairs | yes | yes | yes | yes | yes | Storage API (IndexedDB API), Web Storage API |
| File system management | Storage, management in the local file system | yes | yes | yes | yes | yes | File System API, File and Directory Entries API | |
| Data exchange with other MiniApps | Data exchange between installed apps | yes | yes | yes | yes | Broadcast Channel API, Channel Messaging API | ||
| Compression/Decompression | ZIP file management | yes | yes | yes | yes | |||
| Clipboard | Clipboard set/get | yes | yes | yes | yes | yes | Clipboard API | |
| Cryptography | Encryption, decryption, random | yes | yes | yes | yes | Web Crypto API | ||
| Cache | Cache management (rules, cleaning, etc.) | yes | Content Index API | |||||
| Sensors | Accelerometer | Sensors | yes | yes | yes | yes | yes | Sensor APIs (Accelerometer) |
| Compass | Sensors | yes | yes | yes | yes | yes | Sensor APIs (Magnetometer) | |
| Gyroscope | Sensors | yes | yes | yes | yes | yes | Sensor APIs (Gyroscope) | |
| Proximity sensor | Sensors | yes | Proximity Sensor | |||||
| Step counter | Sensors | yes | yes | yes | yes | |||
| Ambient light sensor | Sensors | Sensor APIs (Ambient Light) |
| Type | Feature | Style? | Funct.? | Rec? | Standard solution? |
|---|---|---|---|---|---|
| Container | Content division | <div> |
direct usage | ||
| Inline container | <span> |
direct usage | |||
| Dialog | <dialog> |
direct usage | |||
| Stacking container | yes | <div>* |
HTML + CSS (div { position: relative; }) |
||
| Slideshow (carousel) | yes | <div>* |
HTML + CSS Flexbox + overscroll-behavior + scroll-behavior... |
||
| Tabs | yes | <nav><section>* |
(OpenUI) (navs + section + CSS) |
||
| List container | yes | <ul><li> |
HTML + CSS | ||
| Fixed container | yes | <div>* |
HTML + CSS | ||
| Scrolling container | yes | <div>* |
HTML + CSS | ||
| Grid layout | yes | <div>* |
HTML + CSS | ||
| Marquee | yes | <marquee> (deprecated)* |
HTML + CSS | ||
| Drag and drop | yes | <div>* |
HTML + Drag and Drop API | ||
| Pull to refresh | yes | <div>* |
HTML + JS + CSS | ||
| Conditional block | @style |
CSS media queries | |||
| Navigation Bar | <nav> |
HTML + CSS |
Better for developers, better for the platform
Examples: <icon>, <scroll-list>, <map>, <ad>...
https://espinr.github.io/sandbox/miniapps/customelements/icon
https://espinr.github.io/sandbox/miniapps/customelements/scroll-view
Do we need a full-fledged embedding browser?
Definition of priorities for developing new Web Engines based on scenarios
Important: the objective is not to fragment the web, just to bring new use cases to the Web
Where?High-Performance Web Engines CG, MiniApps CG, Web DevX CG
WebViews CG's Can I WebView, extends CanIUse.com for WebViews (using Browser-Compat-Data)
The Web brings interoperability, security, i18n, accessibility by default
Martin Alvarez (@espinr)
This Presentation: https://espinr.github.io/talks/2025/0905-MiniApps-HighPerf-WebEvolve
Original content under CC-BY 4.0
To start the slide show, press ‘A’. Return to the index with ‘A’ or ‘Esc’. On a touch screen, use a 3-finger touch. Double click to open a specific slide. In slide mode, press ‘?’ (question mark) to get a list of available commands.