A W3C standard compliant Web rendering engine based on Flutter.

Overview

WebF pub package

WebF (Web on the Flutter) is a W3C standard compliant Web rendering engine based on Flutter, it can run web application on Flutter natively.

  • W3C Standard Compliant: WebF use HTML/CSS and JavaScript to rendering contents on the flutter. It can achieve 100% consistency with browser rendering.
  • Front-End Framework Support: WebF is W3C standard compliant, so it can be used by many Front-End frameworks, including React, Vue.
  • Expand your Web with Flutter: WebF is fully customizable. You can define a customized HTML element with Flutter Widget and used it in your application. Or add a JavaScript API with any Dart library from pub.dev registry.
  • Web Development Experience: WebF support inspect your HTML structure, CSS style and Debugging JavaScript with Chrome Developer Tools, just like the web development experience of your browser.
  • Write Once, Run AnyWhere: By the power of WebF, You can write your web application and run it on any device flutter supports, and you can still run your apps in Node.js and Web Browser with the same code base.

Version requirement

WebF Flutter
>= 0.12.0 < 0.13.0 3.0.5

How to use

packages.yaml

dependencies:
  webf: <lastest version>

import

import 'package:webf/webf.dart';

Use WebF Widget

@override
Widget build(BuildContext context) {
  final MediaQueryData queryData = MediaQuery.of(context);
  final Size viewportSize = queryData.size;

  return Scaffold(
      body: Center(
    child: Column(
      children: [
        WebF(
          devToolsService: ChromeDevToolsService(), // Enable Chrome DevTools Services
          viewportWidth: viewportSize.width - queryData.padding.horizontal, // Adjust the viewportWidth
          viewportHeight: viewportSize.height - queryData.padding.vertical, // Adjust the viewportHeight
          bundle: WebFBundle.fromUrl('https://andycall.oss-cn-beijing.aliyuncs.com/demo/demo-vue.js'), // The page entry point
        ),
      ],
    ),
  ));
}

How it works

WebF provide a rendering engine which follow the W3C standard like the browser does. It can render HTML/CSS and execute JavaScript. It's built on top of the flutter rendering pipelines and implements its' own layout and paint algorithms.

With WebF, Web Apps and Flutter Apps are sharing the rendering context. It means that you can use Flutter Widgets define your HTML elements and embedded your Web App as a Flutter Widget in your flutter apps.

👏 Contributing PRs Welcome

By contributing to WebF, you agree that your contributions will be licensed under its Apache-2.0 License.

Read our contributing guide and let's build a better kraken project together.

Thank you to all the people who already contributed to OpenWebF and OpenKraken!

Copyright (c) 2022-present, The OpenWebF authors.

Comments
Releases(0.13.1)
  • 0.13.1(Dec 12, 2022)

    Bug Fixed

    1. Fix renderBoxModel is null cause performLayout error. https://github.com/openwebf/webf/pull/187
    2. Fix position absolute cause mistake overflow. https://github.com/openwebf/webf/pull/167
    3. Fix var in keyframes not work. https://github.com/openwebf/webf/issues/147
    4. Fix var in translate not work. https://github.com/openwebf/webf/issues/154
    5. Fix unexpected token in linear-graident. https://github.com/openwebf/webf/issues/119
    6. Fix tag element selector. https://github.com/openwebf/webf/issues/169
    7. Fix var attribute dynamic modification exception. https://github.com/openwebf/webf/issues/144

    Feature

    1. Add initialCookies params on WebF widget. https://github.com/openwebf/webf/pull/186
    Source code(tar.gz)
    Source code(zip)
  • 0.13.0(Dec 2, 2022)

    The biggest update since the webf/kraken release.

    1. The DOM API and C++ bindings had been redesigned and refactored. https://github.com/openwebf/webf/pull/18
      1. DOM node operations methods such as Node.appendChild and Node.insertBefore are 2x - 5x faster than 0.12.0.
      2. The new C++ bindings system can keep the bridge code safer to avoid crashes.
    2. Add CSS StyleSheets support. https://github.com/openwebf/webf/pull/11
      1. Support load CSS with <link /> element.
      2. Support load CSS with <style /> element.
    3. Flutter Widgets System had been redesigned and refactored, now all flutter widgets can be used to define your HTMLElements, including from Flutter material design, pub.dev, and yours. https://github.com/openwebf/webf/pull/58
    4. Add CSS animation support. https://github.com/openwebf/webf/pull/41
    5. Sync the latest features from quickjs offical. https://github.com/openwebf/webf/pull/165

    Others Features

    • Add cookie support. https://github.com/openwebf/webf/pull/65

    • Add Quickjs column number support. https://github.com/openwebf/webf/pull/116

    • Support return value from webf. invokeModule API. https://github.com/openwebf/webf/pull/54

      Upgrade from 0.12.0

      This feature could lead to the following error if you using web.addWebfModuleListener API in 0.12.0.

      TypeError: Failed to execute '__webf_add_module_listener__' : 2 argument required, but 1 present.
              at __webf_add_module_listener__ (native)
              at <anonymous> (internal://:127)
              at <eval> (internal://:135)
      

      Please add the target module name to the first arguments:

      before

      webf.addWebfModuleListener(function(moduleName, event, data) {
        if (moduleName == 'AlarmClock') {
           // ...
        }
      });
      

      After

      webf.addWebfModuleListener('AlarmClock', function(event, data) {
       // ...
      });
      

    Bug Fixed

    • CSS hsl() not works. https://github.com/openwebf/webf/issues/23
    • flex:1 failed when the parent node style has minHeight/minWidth property. https://github.com/openwebf/webf/pull/28
    • Fix overflow not works with transform. https://github.com/openwebf/webf/pull/48
    • Fix memory leaks caused by CSSLengthValue and ModuleManager. https://github.com/openwebf/webf/pull/57
    • Fix animation shaking when controlling the animation with touch events. https://github.com/openwebf/webf/pull/67
    • Fix webf_bridge.xcframework and quickjs.xcframework did not product when run flutter build ios-frameworks command. https://github.com/openwebf/webf/pull/71
    • Fix dynamic library not found in some android devices. https://github.com/openwebf/webf/pull/91
    • Fix position and transform to cause a more scrollable area. https://github.com/openwebf/webf/issues/112
    • Fix the size of HTMLElement is not always equal to the viewport. https://github.com/openwebf/webf/pull/122
    • Fix collapsedMarginBottom seems work incorrectly. https://github.com/openwebf/webf/issues/132
    • Fix opacity after transform not work. https://github.com/openwebf/webf/issues/142
    • Fix set attribute with CSS vars not work. https://github.com/openwebf/webf/pull/155
    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Aug 3, 2022)

    Big News

    • Set flutter version requirement to v3.0.5.

    Bug Fixed

    • Fix devtools select dom position offset. https://github.com/openkraken/kraken/pull/1289
    • Fix the white-flash of canvas painting. https://github.com/openkraken/kraken/pull/1317
    • Fix the memory leak of animation timeline lifecycle. https://github.com/openkraken/kraken/pull/1312
    • Fix request failed while response was gzipped. https://github.com/openkraken/kraken/pull/1302
    • Fix exception in paragraph paint in some edge cases. https://github.com/openkraken/kraken/pull/1334
    • Fix flex-basis with percentage not working. https://github.com/openkraken/kraken/pull/1300
    • Fix memory leak when dispatch gesture events. https://github.com/openkraken/kraken/pull/1333
    • Fix negative margin value. https://github.com/openkraken/kraken/pull/1308
    • Fix margin auto value. https://github.com/openkraken/kraken/pull/1331
    • Fix JS error report twice. https://github.com/openkraken/kraken/pull/1337
    • Fix event concurrent exception. https://github.com/openkraken/kraken/pull/1354
    • Fix text white space collapse. https://github.com/openkraken/kraken/pull/1352
    • Fix inline replaced element layout size. https://github.com/openkraken/kraken/pull/1343
    • Fix event listener remove when call removeEventListener. https://github.com/openkraken/kraken/pull/1357/files
    • Fix error of textNode when attach to WidgetElement. https://github.com/openkraken/kraken/pull/1336
    • Fix null safety error when handle pointer events. https://github.com/openkraken/kraken/pull/1360
    • Fix script element with async attribute error. https://github.com/openkraken/kraken/pull/1358
    • Fix event handlers removal with once time. https://github.com/openkraken/kraken/pull/1359
    • Fix text not wrap in flex container of column direction. https://github.com/openkraken/kraken/pull/1356
    • Fix the sliver with positioned element usage problem. https://github.com/openkraken/kraken/pull/1341
    • Fix set overflow on body can still scroll. https://github.com/openkraken/kraken/pull/1366
    • Fix positioned element offset when containing block has transform. https://github.com/openkraken/kraken/pull/1368
    • Fix replaced flex item size. https://github.com/openkraken/kraken/pull/1338
    • Fix memory usage of img element. https://github.com/openkraken/kraken/pull/1347
    • Fix position: fixed elements hittest not correct. https://github.com/openkraken/kraken/pull/1374
    • Fix html scroll value. https://github.com/openkraken/kraken/pull/1367
    • Fix custom element widget unmount. https://github.com/openkraken/kraken/pull/1375
    • Fix the null value for CSS content-visibility and position. https://github.com/openkraken/kraken/pull/1389
    • Fix custom element item layout. https://github.com/openkraken/kraken/pull/1392
    • Fix script elements sync load order. https://github.com/openkraken/kraken/pull/1405
    • Fix element.style property match. https://github.com/openkraken/kraken/pull/1410
    • Fix viewport dispose twice. https://github.com/openkraken/kraken/pull/1404
    • Fix localToGlobal on silver container. https://github.com/openkraken/kraken/pull/1421
    • Fix add PointerDeviceKind on scrollable. https://github.com/openkraken/kraken/pull/1439
    • Fix add new child of sliver container. https://github.com/openkraken/kraken/pull/1412
    • Fix stylesheet can not load with link elements. https://github.com/openkraken/kraken/pull/1441
    • Fix not support relative protocol. https://github.com/openkraken/kraken/pull/1444

    Features

    • Add reset for canvas rendering context 2d. https://github.com/openkraken/kraken/pull/1310
    • Add temporary Console panel at Chrome DevTools. https://github.com/openkraken/kraken/pull/1328
    • Add built-in attributes for event handlers. https://github.com/openkraken/kraken/pull/1330
    • Add document.getElementsByName API. https://github.com/openkraken/kraken/pull/1383
    • Add absolute-size & relative-size keywords of font-size. https://github.com/openkraken/kraken/pull/1430
    • Add scroll support of input、textarea、sliver with mouse wheel when setting overflow. https://github.com/openkraken/kraken/pull/1438
    Source code(tar.gz)
    Source code(zip)
Owner
openwebf
A W3C standard compliant Web rendering engine based on Flutter.
openwebf
Short sample and instructions for configuring a Flutter Web application to deploy-on-push to Firebase Hosting

Short sample and instructions for configuring a Flutter Web application to deploy-on-push to Firebase Hosting

Kevin Moore 18 Nov 17, 2022
Optimized dracula theme vscode extension for flutter, web, electron and golang development.

Optimized Dracula Theme A color theme inspired by dracula color theme. This color theme is not based on dracula color theme. The color styles are simi

wuchuran 1 Jul 11, 2022
Embeddable 3D Rendering Engine with JS, a POC project.

Three.V8 Three.V8 is a proof of concept (POC) of an embedabble 3D rendering engine using JavaScript as user script. Currently, the whole project requi

Fei Yang 24 Nov 29, 2022
Tempo is an easy, intuitive JavaScript rendering engine that enables you to craft data templates in pure HTML.

Tempo 2.0 Tempo is an easy, intuitive JavaScript rendering engine that enables you to craft data templates in pure HTML. Why use Tempo? Clear separati

Twigkit 707 Jan 3, 2023
2D HTML5 rendering and layout engine for game development

Stage.js is a 2D HTML5 JavaScript library for cross-platform game development, it is lightweight, fast and open-source. Check out examples and demos!

Ali Shakiba 2.2k Jan 3, 2023
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021
Cardmatchinggamebyercan - A card-matching game made with Flutter.

card_matching_game_by_ercan A card-matching game. Working Demo: https://confident-austin-19dbd2.netlify.app Getting Started This project is a starting

Ercan Tomac 17 Dec 14, 2022
Convert your SVG file directly to Flutter paths and prevent all the messing with bezier curves.

svg-to-flutter-path-converter Convert your SVG file directly to Flutter paths and prevent all the messing with bezier curves. Flutter Clutter The tool

null 30 Jan 2, 2023
Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing

Flutter 148.1k Jan 7, 2023
It's a set of common utility strategies to work with responsive styles with Flutter and CSS in JS

@skynexui/responsive_stylesheet You don't need to be worried just because you have to support multiple screens ?? ?? ?? ?? It's a set of common utilit

SkynexUI 40 Oct 26, 2022
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Swagger 23.2k Dec 28, 2022
A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces

A11y Tabs A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces. Documentation ↗ Demo on Codepen ↗ Features: Support

null 5 Nov 20, 2022
Browse local files using the non-standard Web Browser File System Access API

Browse local files using the non-standard Web Browser File System Access API

Jeremy Tuloup 16 Oct 26, 2022
The project integrates workflow engine, report engine and organization authority management background, which can be applied to the development of OA, HR, CRM, PM and other systems. With tlv8 IDE, business system development, testing and deployment can be realized quickly.

介绍 项目集成了工作流引擎、报表引擎和组织机构权限管理后台,可以应用于OA、HR、CRM、PM等系统开发。配合使用tlv8 ide可以快速实现业务系统开发、测试、部署。 后台采用Spring MVC架构简单方便,前端使用流行的layui界面美观大方。 采用组件开发技术,提高系统的灵活性和可扩展性;采

Qian Chen 38 Dec 27, 2022
This is an VanillaJS SPA example with function based rendering.

Function-Based-Rendering This is an VanillaJS SPA example with function based rendering. Here's how to create Views by function composition and how to

강호형 3 Oct 16, 2021
A small jQuery plugin for rendering scroll-based HTML animations

Storyline Build beautiful landing pages that change as the user scrolls up or down. Project created in 2013 and ported to GitHub in 2021. Demo Just vi

Mark Jivko 3 May 30, 2022
A JSDOM alternative with support for server side rendering of web components

About A JSDOM alternative with support for server side rendering of web components. Happy DOM aim to support the most common functionality of a web br

David Ortner 1.6k Dec 30, 2022
Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

Phaser - HTML5 Game Framework Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop a

Richard Davey 33.4k Jan 7, 2023
Hexo-backlink - This plugin is for transfer Obsidian-type backlink to standard hexo in-site post link.

Hexo-Backlink A plugin to convert backlink in .md file to in-site link. Install npm install hexo-backlink configuration Add backlink:true in _config.y

null 8 Sep 27, 2022