Skip to content

Indexer needs to recognize functions passed as callback parameters #4128

@stevemessick

Description

@stevemessick

The sample code generated by New Application contains a definition of rotateText() that is used as a callback in the expression: query("#text").on.click.add(rotateText);

That reference is not found by Open Callers or Find References. Current thinking is that the indexer isn't recording the relationship. However, hyperlinking does work.

Since sample code changes, here's the current output from New Application:

import('dart:html');

num rotatePos = 0;

void main() {
  query("#text").text = "Welcome to Dart!";

  query("#text").on.click.add(rotateText);
}

void rotateText(Event event) {
  rotatePos += 360;

  var textElement = query("#text");

  textElement.style.transition = "1s";
  textElement.style.transform = "rotate(${rotatePos}deg)";
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions