mirror of https://github.com/hashicorp/consul
24 lines
576 B
JavaScript
24 lines
576 B
JavaScript
|
import { setModifierManager, capabilities } from '@ember/modifier';
|
||
|
|
||
|
export default setModifierManager(
|
||
|
() => ({
|
||
|
capabilities: capabilities('3.13', { disableAutoTracking: true }),
|
||
|
|
||
|
createModifier() {},
|
||
|
|
||
|
installModifier(_state, element, { positional: [fn, ...args], named }) {
|
||
|
let shadow;
|
||
|
try {
|
||
|
shadow = element.attachShadow({ mode: 'open' });
|
||
|
} catch (e) {
|
||
|
// shadow = false;
|
||
|
console.error(e);
|
||
|
}
|
||
|
fn(shadow);
|
||
|
},
|
||
|
updateModifier() {},
|
||
|
destroyModifier() {},
|
||
|
}),
|
||
|
class CustomElementModifier {}
|
||
|
);
|