webf-api-compatibility
Check Web API and CSS feature compatibility in WebF - determine what JavaScript APIs, DOM…
Install WebF native plugins to access platform capabilities like sharing, payment, camera, geolocation, and more. Use when building features that require native device APIs beyond standard web APIs.
$ npx -y skills add openwebf/webf --skill webf-native-plugins --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/webf-native-pluginsContext preview
The summary Claude sees to decide when to auto-load this skill.
Install WebF native plugins to access platform capabilities like sharing, payment, camera, geolocation, and more. Use when building features that require native device APIs beyond standard web APIs.
name: webf-native-plugins description: Install WebF native plugins to access platform capabilities like sharing, payment, camera, geolocation, and more. Use when building features that require native device APIs beyond standard web APIs.
When building WebF apps, you often need access to native platform capabilities like sharing content, accessing the camera, handling payments, or using geolocation. WebF provides **native plugins** that bridge JavaScript code with native platform APIs.
Native plugins are packages that:
Use native plugins when you need capabilities that aren't available in standard web APIs:
Before implementing a feature, **always check** if a pre-built native plugin exists:
1. Visit the official plugin registry: **https://openwebf.com/en/native-plugins** 2. Browse available plugins by category 3. Check the plugin documentation for installation steps
Every native plugin requires **TWO installations**:
1. **Flutter side** (in your Flutter host app) 2. **JavaScript side** (in your web project)
Visit https://openwebf.com/en/native-plugins and search for the capability you need:
If you have access to the Flutter project hosting your WebF app:
1. Open the Flutter project's `pubspec.yaml` 2. Add the plugin dependency:
dependencies:
webf_share: ^1.0.0 # Replace with actual plugin name3. Run `flutter pub get` 4. Register the plugin in your main Dart file:
import 'package:webf/webf.dart';
import 'package:webf_share/webf_share.dart'; // Import the plugin
void main() {
// Initialize WebFControllerManager
WebFControllerManager.instance.initialize(WebFControllerManagerConfig(
maxAliveInstances: 2,
maxAttachedInstances: 1,
));
// Register the native plugin module
WebF.defineModule((context) => ShareModule(context));
runApp(MyApp());
}In your JavaScript/TypeScript project:
# For the Share plugin example npm install @openwebf/webf-share # Or with yarn yarn add @openwebf/webf-share
Import and use the plugin in your application:
import { WebFShare } from '@openwebf/webf-share';
// Use the plugin API
const success = await WebFShare.shareText({
title: 'My App',
text: 'Check out this amazing content!',
url: 'https://example.com'
});**Description**: Share content, text, and images through native platform sharing
**Capabilities**:
**Flutter Package**: `webf_share: ^1.0.0`
**npm Package**: `@openwebf/webf-share`
**Example Usage**:
import { WebFShare, ShareHelpers } from '@openwebf/webf-share';
// Share text content
await WebFShare.shareText({
title: 'Article Title',
text: 'Check out this article!',
url: 'https://example.com/article'
});
// Share an image from canvas
const canvas = document.getElementById('myCanvas');
const imageData = ShareHelpers.canvasToArrayBuffer(canvas);
await WebFShare.shareImage(imageData);
// Save screenshot
await WebFShare.saveScreenshot(imageData);**Storage Locations**:
See the [Native Plugins Reference](./reference.md) for more available plugins.
Always check if a plugin is available before using it:
// Check if plugin is loaded
if (typeof WebFShare !== 'undefined') {
await WebFShare.shareText({ text: 'Hello' });
} else {
// Fallback or show message
console.log('Share plugin not available');
}Wrap plugin calls in try-catch blocks:
try {
const success = await WebFShare.shareText({
title: 'My App',
text: 'Check this out!'
});
if (success) {
console.log('Content shared successfully');
}
} catch (error) {
console.error('Failed to share:', error);
// Show error message to user
}All plugins include TypeScript definitions:
import type { ShareTextOptions } from '@openwebf/webf-share';
const shareOptions: ShareTextOptions = {
title: 'Article',
text: 'Read this article',
url: 'https://example.com'
};
await WebFShare.shareText(shareOptions);If you need capabilities not provided by existing plugins, you can create your own:
1. **Read the Plugin Development Guide**: https://openwebf.c
Repo: openwebf/webf
Check Web API and CSS feature compatibility in WebF - determine what JavaScript APIs, DOM…
Understand and work with WebF's async rendering model - handle onscreen/offscreen events and…
Create high-performance infinite scrolling lists with pull-to-refresh and load-more…
Develop custom WebF native plugins based on Flutter packages. Create reusable plugins that…
Develop custom native UI libraries based on Flutter widgets for WebF. Create reusable…
Setup and use WebF's Cupertino UI library to build native iOS-style UIs with pre-built…