1.1.5 • Published 4 years ago
@bpa-solutions/bpa-polyfills v1.1.5
BPA Polyfills
A collection of polyfills for Edge in SharePoint SPFx environment
Build:
The build has two pipeline :
- A dev process, that will compile the file in "development" mode, and launch a BrowserSync server on localhost:3000
- A prod process, that will only compile files and generate a build output with WebPack
Tasks
- npm run dev : build the project in development mode
- npm run build : build the project in production mode
- gulp --gulpfile tasks html : compile all the html files from test into a single bundle.html file. Used in development mode
- gulp --gulpfile tasks modernizr : generate a custom Modernizr file with only the rules used in the sources files
Use in SPFx / React environment
Install the package
npm install @bpa-solutions/bpa-polyfills
OR
yarn add @bpa-solutions/bpa-polyfills
Add the dependency
In your main WebPart file, add the following line:
import '@bpa-solutions/bpa-polyfills'
Support
This package is intended to be incorporated in SharePoint SPFx Client-Side WebPart with React. It won't cover polyfill already deployed in Microsoft's build tool, like ES6 Promise
Polyfills list
Covered
JS:
- ES5
- ES6
- E2016 Array Includes
- ES2017 Object
- ES2017 String
HTML:
- input type="date"
- details
- summary
CSS:
- CSS Custom Properties
Missing / ToDo
Priority 1
- input type="time" / input type="datetime"
- css text-orientation
- css image-set
- custom elements
- dialog
- download attribute
- form attribute
- html template
- push api
- shadow dom
Priority 2
- css calc
- css flex
- viewport units vw, vh, vmin and vmax
- html5 form features
- html5 semantic elements
- device orientation & device motion
- dom matches()
- data uri
- constraint validation api
- custom event
- file api
- filereader api
- screen orientation
- autocomplete attribute