You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gl_js.go
    path of file: ./repos/gdlv/vendor/gioui.org/app
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Unlicense OR MIT

package app

import (
	"errors"
	"syscall/js"

	"gioui.org/gpu"
	"gioui.org/internal/gl"
)

type glContext struct {
	ctx js.Value
	cnv js.Value
	w   *window
}

fun
    
func (c *glContext) Refresh() error {
	switch c.w.contextStatus {
	case contextStatusLost:
		return errOutOfDate
	case contextStatusRestored:
		c.w.contextStatus = contextStatusOkay
		return gpu.ErrDeviceLost
	default:
		return nil
	}
}