Skip to content

@export on a Polymer method just adds the method to "Object.prototype" #2669

Open

Description

I noticed this while fixing a bug in GenerateExports: If you add @export to a method of a Polymer element that is defined in the Polymer 1 style (Polymer({ method1() {} method2() {} })) the compiler just adds that method to Object.prototype in the externs, rather than generating a goog.exportSymbol call. This means that other properties with the same name won't get renamed, so code size might suffer. If a Polymer project finds their code size is too big this is one place we might look. Until then, I'm guessing this is a relatively low-priority issue.

cc @rictic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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