Skip to content

Event model is flaky #26

@arthurevans

Description

@arthurevans

This is kind of a meta-bug, related to issues reported on the catalog (googlearchive/polymer-element-catalog#207) and elsewhere.

Briefly, the ordering of attached can vary based on whether you're polyfilled or not, so the current interaction model for this element is racy.

I think this was an early experiment in loosely-coupled components, but the protocol isn't reliable.

I suggest that we could either make it more reliable, or simply turn prism-element into a prism-behavior that exposes a single highlight(code, language-hint) function. Which would remove the loose coupling benefits, but be fast and reliable.

... Or we tell users they should fire the event, and see if they get results, and if not, wait a rAF and try again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions