mirror of
https://github.com/wassname/template.git
synced 2026-07-08 08:02:33 +08:00
Merge branch 'master' of github.com:distillpub/template
This commit is contained in:
@@ -102,7 +102,7 @@ export class Cite extends T(HTMLElement) {
|
||||
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
const eventName = oldValue ? 'onCiteKeyChanged' : 'onCiteKeyCreated';
|
||||
const keys = newValue.split(',');
|
||||
const keys = newValue.split(',').map(k => k.trim());
|
||||
const options = { detail: [this, keys], bubbles: true };
|
||||
const event = new CustomEvent(eventName, options);
|
||||
document.dispatchEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user