Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,22 @@ import dialogPolyfill from 'dialog-polyfill'
const dialogPolyfill = require('dialog-polyfill')
```

Any of these inclusion methods will automatically inject css into `<head>`.


### Supports

This polyfill works on modern versions of all major browsers. It also supports IE9 and above.

### Steps

1. Include the CSS in the `<head>` of your document, and the Javascript anywhere before referencing `dialogPolyfill`.
2. Create your dialog elements within the document. See [limitations](#limitations) for more details.
3. Register the elements using `dialogPolyfill.registerDialog()`, passing it one node at a time. This polyfill won't replace native support.
4. Use your `<dialog>` elements!
1. Create your dialog elements within the document. See [limitations](#limitations) for more details.
2. Register the elements using `dialogPolyfill.registerDialog()`, passing it one node at a time. This polyfill won't replace native support.
3. Use your `<dialog>` elements!

## Script Global Example

```html
<head>
<link rel="stylesheet" type="text/css" href="dist/dialog-polyfill.css" />
</head>
<body>
<dialog>
I'm a dialog!
Expand Down
Loading