• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    JavaScript
  • Created about 11 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

(deprecated) Browserify-compatible web-component polyfills, courtesy of Polymer

polyfill-webcomponents

Deprecated

Thanks for all the support, but this package is now deprecated. polyfill-webcomponents served its purpose while there was no official equivalent, but now there is webcomponents.js which has more frequent updates and is maintained by the polymer team. Whoo!


Web Components Polyfills for use with Browserify.

This is the Polymer Platform in a browserify-compatible package. This is not the full Polymer framework (e.g. no <polymer-element>), it's just the platform, which provides the polyfills for next-generation web technology (plus some other stuff).

image

Features

  • CustomElements
  • ShadowDOM
  • HTMLTemplates
  • Model Driven Views
  • WeakMap
  • PointerEvents
  • PointerGestures
  • HTMLImports

Due to nature of the browser, isolated encapsulation of these polyfills is not possible, thus be warned this modifies your entire browser environment i.e. does not play well with others.

Documentation

See the documentation specifically for the Platform on the Polymer website.

Versioning

Polyfills will be regularly updated to latest development versions. As there is no sensible way to do semver, versions will be tagged by timestamp: 0.YYYYMMDD.patch. Patch version may be incremented if there's a critical problem with the build. If you want me to cut a new build to incorporate a particular update, please just open an issue.

Usage

See the Getting Started guide for a step-by-step example.

Use in-browser only with browserify.

// polyfill your browser environment
var Platform = require('polyfill-webcomponents')
// Platform is polymer's proprietary namespace, contains some helpers
// Note this will creates a bunch of globals.

Simply require('polyfill-webcomponents') anywhere your code depends on webcomponents support.

You can safely require('polyfill-webcomponents') multiple times, it will only add the polyfills once.

Installation

> npm install polyfill-webcomponents

Use as a peer dependency

Peer dependencies allow child modules to require that the parent module has a compatible version installed. Despite the npm team no longer being keen on peer-dependencies, I believe this is a perfect use-case for them and I recommended you set polyfill-webcomponents as a Peer Dependency for anything except your top-level application.

Because polyfill-webcomponents necessarily modifies your global state, and has been configured to only apply the polyfills once, it doesn't make much sense to have multiple copies of it bundled in your app.

Add this to your package.json:

  "peerDependencies": {
    "polyfill-webcomponents": "*"
  },

Browser Compatibility

Polymer is alpha software. Support/performance is a bit fickle in everything but Chrome & Canary, and you may even experience dramatic differences between versions of Chrome. For best experience you'll want to at least enable:

  • chrome://flags/#enable-experimental-web-platform-features
  • chrome://flags/#enable-html-imports
  • chrome://flags/#enable-javascript-harmony

But remember to also test for degraded performance with these features off.

These polyfills work (with caveats) in Evergreen Browsers.

  • Chrome
  • Canary
  • Chrome Android
  • Firefox
  • Safari 6+
  • Mobile Safari
  • Internet Explorer 10+

Do the web a favour, insist on only supporting Evergreen Browsers in your upcoming project.

See Polymer's documentation for more information.

TODO

No Fork

If this package does not work as expected, let's work together to fix it; the last thing we need is more random 3rd parties scattering unofficial Polymer pieces around npm.

More Repositories

1

functional-javascript-workshop

A functional javascript workshop. No libraries required (i.e. no underscore), just ES5.
JavaScript
2,049
star
2

best-practices

Tidbits of developer best practices from around the web
1,275
star
3

keycode

Convert between keyboard keycodes and keynames and vice versa.
JavaScript
452
star
4

columnify

Create text-based columns suitable for console output. Supports cell wrapping.
JavaScript
428
star
5

linklocal

Install local dependencies as symlinks.
JavaScript
349
star
6

npm-run

Run locally-installed node module executables.
JavaScript
183
star
7

pkgfiles

Sanity check which files you are and aren't about to publish to npm
JavaScript
82
star
8

npm-which

Locate a program or locally installed node module's executable
JavaScript
78
star
9

offset

Get offset of an element within the document
JavaScript
59
star
10

wcwidth

Port of C's wcwidth() and wcswidth()
JavaScript
52
star
11

npm-path

Get a PATH containing locally installed module executables.
JavaScript
49
star
12

colornames

Map color names to HEX color values
JavaScript
45
star
13

react

Emit change events whenever object changes. Compatible with component/reactive.
JavaScript
41
star
14

sift

Fast String Distance (SIFT) Algorithm
JavaScript
40
star
15

npm3

Use npm v3 alongside your currently installed npm.
JavaScript
34
star
16

pkgcount

Produce a report on number of duplicate packages in node_modules.
JavaScript
29
star
17

scroll-position

Fire events when scrolling over dom elements
JavaScript
28
star
18

next-tick

process.nextTick for browser
JavaScript
25
star
19

robotlegs-utilities-UndoableCommand

Undoable Command Classes for Robotlegs Framework
JavaScript
24
star
20

npm-tutor

npm tutor for nodeconf 2014
JavaScript
23
star
21

saltmine

Arbitrary computation on the GPU using WebGL.
JavaScript
22
star
22

mdm-tunnel

A tunnel for getting behind NATs
JavaScript
20
star
23

cruft

Delete cruft from npm packages
JavaScript
19
star
24

nim

Command-line tool for inspecting node library objects, function implementations and listing properties โ€“ with syntax highlighting.
JavaScript
19
star
25

adventure-map

Simple exercise loader & generators for substack/adventure.
JavaScript
19
star
26

tojson-loader

WebPack Loader. Generate JSON assets at build-time.
JavaScript
18
star
27

css-path

Get CSS path to an element.
JavaScript
18
star
28

chimes

`Array.prototype` iteration methods for any iterator.
JavaScript
18
star
29

to-factory

Convert ES6 classes into factory functions so they can be called with or without new.
JavaScript
18
star
30

graphs

An intuitive data structure for graphs, implemented using ES6 data structures.
JavaScript
17
star
31

canvas-noise

Generate noise on a canvas.
JavaScript
16
star
32

serializerr

Convert Errors & Objects into an easily-serialized vanilla Object.
JavaScript
15
star
33

osi-licenses-full

All OSI-approved licenses as markdown
JavaScript
15
star
34

split-object

Work with Objects using built-in functional Array methods.
JavaScript
14
star
35

assertf

assert with printf message formatting
JavaScript
14
star
36

pkgrep

Powerful CLI tool to find, filter & format package data in node_modules.
JavaScript
13
star
37

npm-next

Wraps the latest unstable version of npm with different name so you can test alongside stable npm.
JavaScript
12
star
38

pkill

Convenience wrapper around `pkill(1)`
JavaScript
12
star
39

async-compose

Compose multiple async functions together to operate on a result.
JavaScript
11
star
40

voxel-real-physics

"Real" physics for VoxelJS with CANNON.JS
JavaScript
11
star
41

scriptloader

Absurdly simple on-demand script loader.
JavaScript
10
star
42

node-webhooks

easily create webhooks
JavaScript
10
star
43

protochain

Get the prototype chain of an object or primitive as an Array.
JavaScript
9
star
44

get

Create functions for use with map, reduce, filter, etc. that get object properties without need for anonymous wrappers.
JavaScript
9
star
45

express-koans

WIP Express 3 Koans
JavaScript
9
star
46

color-convert

Convert colors between RGB, HSL & HSV.
JavaScript
9
star
47

til

Today I learned
8
star
48

file-uploader

Programmatic multipart file uploads
JavaScript
8
star
49

enode

Easily harness the power of DNode/Upnode
JavaScript
8
star
50

beforefn

Execute a function before a function.
JavaScript
8
star
51

afterfn

Invoke a function after a function.
JavaScript
7
star
52

neuquant

NeuQuant Neural-Net Quantization Algorithm
JavaScript
7
star
53

guardfn

Conditionally execute a function
JavaScript
7
star
54

voxel-merge

Merge voxel chunks into convex volumes.
JavaScript
7
star
55

to-array

Convert an array-like object into an Array.
JavaScript
7
star
56

installed

Read all the installed packages in a folder, and produce an Array of all the data.
JavaScript
7
star
57

pkgresolve

Resolve a dependency from within the context of another package.
JavaScript
6
star
58

stitchup

Command-line stitchjs. Easily package and minify Javascript & Coffeescript CommonJS modules. Individual modules can be imported in the browser via require()
CoffeeScript
6
star
59

midi-experiment

JavaScript
6
star
60

assert

assert module ported from Node.JS for use as a component in the browser.
JavaScript
6
star
61

xpath

XPath utilities extracted from Firebug.
JavaScript
6
star
62

grunt-ember

Collate Ember templates into a single file
JavaScript
6
star
63

candlelightproject

Android IPv6 Geo-Location Based Wireless Mesh Network
Java
6
star
64

opengl-es2-docset

Dash docset for OpenGL ES 2.0 (i.e. webgl)
HTML
5
star
65

element-collection

Provide enumerable methods (find/select/filter) to collections of DOM Elements
JavaScript
5
star
66

ordered-set

A performant ES6 Set subclass that defines custom iteration order.
JavaScript
5
star
67

fnfn

Add before/after/around/guard functions to an API.
JavaScript
5
star
68

statement

A State Machine. Under Construction.
JavaScript
5
star
69

cellutron

My first attempt at a game. Top down 'shooter' style. Pure AS3. Uses box2d physics, TweenMax for tweening & Flint for some particles.
ActionScript
4
star
70

npm-prev

Wraps previous stable version of npm so you can run it alongside other npm versions
JavaScript
4
star
71

element-selector

Use mouse to select elements on the screen
JavaScript
4
star
72

npm-fresh

Keep your npm cache fresh.
JavaScript
4
star
73

candlelight

Android Mesh Network
3
star
74

silk-app-examples

Gregfroese's Silk Example Components
PHP
3
star
75

pipe-graph

Generate graphs of your streams.
JavaScript
3
star
76

overshadow-listeners

Add an event listener before existing listeners.
JavaScript
3
star
77

signalfn

Simple signalling
JavaScript
3
star
78

es5-workshop

Introduction to ES5 methods.
JavaScript
3
star
79

slow-install

An npm package that's slow to install. Slowness is configurable.
JavaScript
2
star
80

get-descriptor

Prototype-aware Object.getOwnPropertyDescriptor
JavaScript
2
star
81

eventsource-stream

Stream events to the browser as server-sent events.
JavaScript
2
star
82

node-xmlrpc-multicall

system.multicall for node-xmlrpc
JavaScript
2
star
83

bin-path

Get paths to module executables
JavaScript
2
star
84

attribute-binding

Bind to incoming data via attributes on your custom elements.
JavaScript
2
star
85

component-server

Easily serve local components as dependencies.
JavaScript
2
star
86

statemachine

A State Machine. Under Construction.
JavaScript
2
star
87

xpath2css

Convert simple xpaths to CSS selectors.
JavaScript
2
star
88

namefn

Rename a function.
JavaScript
2
star
89

lzw

LZW Encoder
JavaScript
2
star
90

component-badge

Generate component badges. WIP
JavaScript
2
star
91

backbone-events

Backbone.Events API as a component
JavaScript
2
star
92

browserify-slides

SingaporeJS 17 Feb 2014
JavaScript
2
star
93

component-dashdoc

Generate a Dash docset for published components.
JavaScript
2
star
94

tapef

Tape API with Mocha's error output. A hack.
JavaScript
2
star
95

switchstream

switch between output streams. e.g. a filter that pipes valid & invalid data to different streams
JavaScript
2
star
96

dom-support

Component to test browser feature support.
JavaScript
2
star
97

pincushion

JavaScript
2
star
98

expressions

Grab bag of template binding expressions.
JavaScript
2
star
99

overlay

Generate overlays over DOM elements.
JavaScript
2
star
100

npm-home

Chrome Extension. Redirects to a package's github page from npm.org. Simulates original behaviour of `npm home`.
JavaScript
2
star