Giter Site home page Giter Site logo

fable-browser's Introduction

fable-browser

Fable bindings for Browser Web APIs

NuGet Name Description
Nuget Package Fable.Browser.Blob Bindings for the browser Blob API.
Nuget Package Fable.Browser.Dom Bindings for DOM and HTML interfaces
Nuget Package Fable.Browser.Event Bindings for the browser Event interface
Nuget Package Fable.Browser.Performance Bindings for the browser Performance API
Nuget Package Fable.Browser.Url Bindings for the browser Url API
Nuget Package Fable.Browser.WebSocket Bindings for the browser WebSocket API
Nuget Package Fable.Browser.WebRTC Bindings for the browser WebRTC API
Nuget Package Fable.Browser.WebStorage Bindings for the Web Storage API
Nuget Package Fable.Browser.XMLHttpRequest Bindings for the browser XMLHttpRequest API
Nuget Package Fable.Browser.Svg Bindings for the browser Svg API
Nuget Package Fable.Browser.Css Bindings for the browser Css API
Nuget Package Fable.Browser.Worker Bindings for the browser Worker API
Nuget Package Fable.Browser.Geolocation Bindings for the browser Geolocation API
Nuget Package Fable.Browser.Navigator Bindings for the browser Navigator API
Nuget Package Fable.Browser.MediaStream Bindings for the browser MediaStream API
Nuget Package Fable.Browser.MediaRecorder Bindings for the browser MediaRecorder API
Nuget Package Fable.Browser.MediaQueryList Bindings for the browser MediaQueryList API
Nuget Package Fable.Browser.WebGL Bindings for the browser WebGL API

Usage

After installing one of the Nuget packages you can access the API. For that, you only need to open the Browser namespace.

open Browser

let fooEl = document.getElementById("foo")

Note the API values are actually contained in an [<AutoOpen>] module, so if you need to fully qualify the value to avoid name conflicts, use the full module name (same as the Nuget package without Fable. prefix):

let fooEl = Browser.Dom.document.getElementById("foo")

If you need to reference one of the types in the package, open the Browser.Types namespace:

open Browser.Types

let handleClick (ev: MouseEvent) = printfn "click!"

Publishing

If you have rights to publish the packages, the only thing you need to do is to bump the version in the appropriate RELEASE_NOTES file and then run npm run publish. The build script will automatically detect what packages have new versions, update the .fsproj file and push a release. Just make sure:

  • Your Nuget API key is in a FABLE_NUGET_KEY environmental variable
  • The packages you want to publish are listed in the packages list of the Build.fsx script

fable-browser's People

Contributors

alfonsogarciacaro avatar mangelmaxime avatar rastreus avatar titaye avatar angelmunoz avatar markpattison avatar baronfel avatar kodfodrasz avatar mangelmaximeas avatar zaid-ajaj avatar dependabot[bot] avatar nojaf avatar nhowka avatar belka-ew avatar jirkacv avatar jwosty avatar dredgy avatar vbfox avatar luiz-monad avatar mnie avatar saboco avatar forki avatar kerams avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.