Skip to content

Conversation

@gnestor
Copy link
Contributor

@gnestor gnestor commented Apr 10, 2017

Follow up from #2297

This will trigger the clear_output_CodeCell event before clearing the output area, allowing extensions to clean up before clearing the output element. This also triggers the event on CodeCell.execute.

@gnestor gnestor requested a review from jasongrout April 10, 2017 18:46
@gnestor
Copy link
Contributor Author

gnestor commented Apr 10, 2017

@jasongrout Care to review?

@gnestor gnestor added this to the 5.1 milestone Apr 11, 2017
@jasongrout
Copy link
Member

Can you look at #2411? That would supersede this.

In #2411, I kept the event on the output area since in widgets, we use the output area outside of a cell. Having the event there lets us listen for events on our own output areas.

}

this.output_area.clear_output(false, true);
this.clear_output(false, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasongrout I think that this.clear_output should be used instead of this.output_area.clear_output because this.clear_output triggers events whereas this.output_area.clear_output doesn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think this diff should make it into the notebook via the PR or #2411

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

jasongrout added a commit to jasongrout/notebook that referenced this pull request Apr 13, 2017
@gnestor gnestor closed this Apr 13, 2017
@gnestor gnestor deleted the clear-output-event branch October 12, 2017 22:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants