webf-api-compatibility
from openwebf/webf
Bring JavaScript and Web Dev to Flutter
npx skills add https://github.com/openwebf/webf --skill webf-api-compatibilitySKILL.md
WebF API & CSS Compatibility
Note: WebF development is nearly identical to web development - you use the same tools (Vite, npm, Vitest), same frameworks (React, Vue, Svelte), and same deployment services (Vercel, Netlify). This skill covers one of the 3 key differences: checking API and CSS compatibility before implementation. The other two differences are async rendering and routing.
WebF is NOT a browser - it's a Flutter application runtime that implements W3C/WHATWG web standards. This means some browser APIs are not available, and some CSS features work differently.
This skill helps you quickly check what's supported and find alternatives for unsupported features.
Quick Compatibility Check
When asked about a specific API or CSS feature, I will:
- Check if it's in the supported list
- Provide the compatibility status (✅ Supported, ⏳ Coming Soon, ❌ Not Supported)
- Explain why it's not supported (if applicable)
- Suggest alternatives or workarounds
JavaScript & Web APIs
✅ Fully Supported
Timers & Animation
setTimeout(),clearTimeout()setInterval(),clearInterval()requestAnimationFrame(),cancelAnimationFrame()
Networking
fetch()- Full support with async/awaitXMLHttpRequest- For legacy codeWebSocket- Real-time communicationURLandURLSearchParams- URL manipulation
Storage
localStorage- Persistent key-value storagesessionStorage- Session-only storage
Graphics
- Canvas 2D - Full 2D canvas API
- SVG - SVG element rendering
DOM APIs
document,window,navigatorquerySelector(),querySelectorAll()addEventListener(),removeEventListener()createElement(),appendChild(), etc.MutationObserver- Watch DOM changes- Custom Elements - Define custom HTML elements
Events
click- Enabled by default- Other events via
FlutterGestureDetector(double-tap, long-press, etc.)
⏳ Coming Soon
- CSS Grid - Planned for future release
- Tailwind CSS v4 - Planned for 2026
❌ NOT Supported
Storage
- IndexedDB - Use native plugin instead
- Alternative:
sqflite,hive, or custom plugin
- Alternative:
Graphics
- WebGL - Not available, no alternative
- Web Animations API (JavaScript) - CSS animations work, but not the JS API
Workers
- Web Workers - Not needed
- Why: JavaScript already runs on dedicated thread in WebF
- No performance benefit from workers
DOM
- Shadow DOM - Not used for component encapsulation
- Use framework component systems instead (React, Vue, etc.)
Observers
- IntersectionObserver - Use
onscreen/offscreenevents instead
CSS Compatibility
✅ Fully Supported Layout Modes
Standard Flow
block- Block-level elementsinline- Inline elementsinline-block- Inline elements with block properties
Flexbox (Recommended)
display: flex- All flex properties (
justify-content,align-items,flex-direction, etc.) - This is the recommended layout approach
Positioned Layout
position: relativeposition: absoluteposition: fixedposition: sticky
Text & Direction
- RTL (right-to-left) support
- All text alignment and direction properties
❌ NOT Supported Layout Modes
Float Layout (Legacy)
float: left/float: right- NOT SUPPORTEDclear- NOT SUPPORTED- Why: Legacy layout model, use Flexbox instead
Table Layout
display: table- NOT SUPPORTEDdisplay: table-row,display: table-cell- NOT SUPPORTED- Why: Use Flexbox or CSS Grid (when available)
⏳ Coming Soon
CSS Grid
display: grid- Planned- All grid properties - Planned
- Use Flexbox until Grid is available
✅ Fully Supported CSS Features
Colors & Backgrounds
- All color formats (hex, rgb, rgba, hsl, hsla, named)
background-color,background-image,background-size, etc.- Linear gradients, radial gradients
Borders & Shapes
border,border-radius,border-color, etc.box-shadow,text-shadow
Transforms (Hardware Accelerated)
transform: translate(),rotate(),scale(),skew()- 2D and 3D transforms
- Use for smooth animations
Animations & Transitions
transition- All transition properties@keyframesandanimation- CSS animations are fully supported
Layout & Sizing
width,height,min-width,max-width, etc.margin,paddingbox-sizing
Responsive Design
@mediaqueries- Viewport units (
vw,vh,vmin,vmax) - Some advanced units not supported (
dvh,lvh,svh)
Advanced CSS
- CSS variables (
--custom-property) - Pseudo-classes (
:hover,:active,:focus, etc.) - Pseudo-elements (
::before,::after) - Filters (
blur,brightness,contrast, etc.) z-indexand stacking contexts
⚠️ Partially Supported
Tailwind CSS
- v3 - ✅ Supported (s
...