Closed kylewelsby closed 4 years ago
Hi Kyle, thanks for opening this issue and thanks for using WCA!
I agree that this is needed :+1: I have implemented it on the branch https://github.com/runem/web-component-analyzer/tree/refactor and is being tracked with the issue https://github.com/runem/web-component-analyzer/issues/125
In future you will be able to mark you events private
or protected
using jsdoc private like this:
@customElement('testing')
export default class Testing extends LitElement {
render() {
return html`<child-element></child-element>`
}
firstUpdated() {
let child = document.querySelector('child-element')
setTimeout(() => {
/**
* @private
*/
child.dispatchEvent(new CustomEvent('ping'))
}, 1000)
}
}
I will close this issue when it has been released :sunny:
I have come across a scenario where I would like to emit an event from a host element to a child element in reaction to something which is intended to be internal only and not display in the documented output.
Perhaps using the
@private
tag as referenced in #106Example:
Expected:
omit eventName
ping
from the documentation.