Skip to content

"Extraneous non-props attributes passed" warning posted for v-on attribute #1001

@mika76

Description

@mika76

Version

3.0.0-beta.2

Reproduction link

https://jsfiddle.net/dajb4q2k/1/

Steps to reproduce

  • Create a child component with a fragment which emits some event
  • Add a v-on event handler in the parent

What is expected?

The event should be thrown and no warning needs to be given

What is actually happening?

The even works perfectly fine, but a warning is thrown:

vue.global.js:4683 [Vue warn]: Extraneous non-props attributes (onBtn-clicked) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 
  at <Anonymous onBtn-clicked=fn<cl> >  
  at <Anonymous> (Root)

I think the warning should not be thrown for v-on attributes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions