pub fn receive_requests(&mut self) {
        if let Some(request_receiver) = &self.request_receiver {
            for request in request_receiver.try_iter() {
                match request {
                    WindowRequest::Redraw => {
                        self.update = true;
                        self.redraw = true;
                    }
                    WindowRequest::ChangeTitle(title) => {
                        document().set_title(title.as_str());
                        self.update = true;
                        self.redraw = true;
                    }
                    WindowRequest::Close => {
                        self.close = true;
                    }
                }
            }
        }
    }
/// Receives window request from the application and handles them.
Receives window request from the application and handles them.
Receives window request from the application and handles them .
pub fn receive_requests(&mut self) {
        if let Some(request_receiver) = &self.request_receiver {
            for request in request_receiver.try_iter() {
                match request {
                    WindowRequest::Redraw => {
                        self.update = true;
                        self.redraw = true;
                    }
                    WindowRequest::ChangeTitle(title) => {
                        document().set_title(title.as_str());
                        self.update = true;
                        self.redraw = true;
                    }
                    WindowRequest::Close => {
                        self.close = true;
                    }
                }
            }
        }
    }
pub fn receive_requests ( & mut self ) { if let Some ( request_receiver ) = & self . request_receiver { for request in request_receiver . try_iter ( ) { match request { WindowRequest :: Redraw => { self . update = true ; self . redraw = true ; } WindowRequest :: ChangeTitle ( title ) => { document ( ) . set_title ( title . as_str ( ) ) ; self . update = true ; self . redraw = true ; } WindowRequest :: Close => { self . close = true ; } } } } }
Receives window request from the application and handles them.
Receives window request from the application and handles them .
&mut self