npm.io
0.0.1 • Published 5d ago

@ungap/processing-instruction

Licence
MIT
Version
0.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
2

@ungap/processing-instruction

A polyfill for ProcessingInstruction attributes.

import patch from 'https://esm.run/@ungap/processing-instruction';

const template = document.createElement('template');
template.innerHTML = 'a<?b c="d" ?>c';

[...patch(template.content).childNodes];

// [text, b, text]

Keywords