A component called my-component
was created by me, which sends the message my-message
using this.$emit('my-message')
.
To respond to this message, I attempted to utilize
<my-component @my-message="()=>console.log('hello')" />
Upon checking the console, I encountered a warning (followed by an error)
The property or method "console" is not defined on the instance but referenced during render
Having repeated this mistake several times before, my guess is that the issue stems from using fat arrows in context (this
versus that = this
previously) but at this point, I am confused.
console
can be accessed as Window.console
, yet utilizing the full form of Window
yields the same error.