mirror of
https://github.com/wassname/template.git
synced 2026-06-27 17:50:45 +08:00
Trim whitespace
Trimming whitespace on keys.
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