mirror of
https://github.com/servo/servo.git
synced 2025-07-13 10:23:40 +01:00
Auto merge of #12495 - ice9js:implement-runnable-for-PauseIfNotInDocumentTask, r=KiChjang
Implement Runnable trait name method for PauseIfNotInDocumentTask Implements #12350. --- <!-- 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 #12350. <!-- Either: --> - [X] These changes do not require tests <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12495) <!-- Reviewable:end -->
This commit is contained in:
commit
589c6eeb0f
1 changed files with 2 additions and 0 deletions
|
@ -801,6 +801,8 @@ impl PauseIfNotInDocumentTask {
|
|||
}
|
||||
|
||||
impl Runnable for PauseIfNotInDocumentTask {
|
||||
fn name(&self) -> &'static str { "PauseIfNotInDocumentTask" }
|
||||
|
||||
fn handler(self: Box<PauseIfNotInDocumentTask>) {
|
||||
let elem = self.elem.root();
|
||||
if !elem.upcast::<Node>().is_in_doc() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue