Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement console.clear #27294

Closed
jdm opened this issue Jul 16, 2020 · 3 comments
Closed

Implement console.clear #27294

jdm opened this issue Jul 16, 2020 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Jul 16, 2020

Spec: https://console.spec.whatwg.org/#clear
Code: components/script/dom/console.rs

We'll need some new devtools integration for this.

@mustafapc19
Copy link
Contributor

@mustafapc19 mustafapc19 commented Jul 24, 2020

Hi. I am new-comer to this. But I think I might be able to do this if I was given some additional resources and a little bit of help navigating the codebase.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 26, 2020

  • the WebIDL in components/script/dom/webidls/Console.webidl
  • the DOM implementation in components/script/dom/console.rs
  • the script->devtools integration in components/devtools_traits/lib.rs
  • the devtools server in components/devtools/actors/console.rs

We need our devtools server code in to send a ConsoleAPI message with a level value of "clear", according to https://searchfox.org/mozilla-central/rev/cf561cece0ca9aeaf0202e68699836d957d0c670/devtools/client/webconsole/utils/messages.js#134-148. That means we need to send a message to the devtools server from the console.rs code when Console::Clear is called.

You can test these changes following https://github.com/servo/servo/wiki/Devtools and connecting to an instance of Servo from the Firefox remote devtools.

Please ask questions if anything is unclear!

@mustafapc19
Copy link
Contributor

@mustafapc19 mustafapc19 commented Jul 27, 2020

U can assign me for this. I'll ask questions if I find some roadblocks. And thanks for your imput :).

@jdm jdm added the C-assigned label Jul 27, 2020
@mustafapc19 mustafapc19 mentioned this issue Jul 29, 2020
4 of 5 tasks complete
bors-servo added a commit that referenced this issue Jul 29, 2020
console.clear implemented

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #27294  (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it deals with Firefox's devtools.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.