Skip to content

Commit

Permalink
Update selectors for querying events from mozilla
Browse files Browse the repository at this point in the history
It seems the page https://developer.mozilla.org/en-US/docs/Web/Events
has changed. This commit Updates the selector to reflect this.
  • Loading branch information
gernest committed Apr 15, 2018
1 parent 19a11ec commit 1523567
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
52 changes: 37 additions & 15 deletions event/event.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ func AnimationStart(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "animationstart", Listener: listener}
}

// Appinstalled is an event fired when a web application is successfully
// installed as a progressive web app.
//
// https://developer.mozilla.org/docs/Web/Events/appinstalled
func Appinstalled(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "appinstalled", Listener: listener}
}

// AudioEnd is an event fired when the user agent has finished capturing audio
// for speech recognition.
//
Expand All @@ -53,14 +61,6 @@ func AudioEnd(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "audioend", Listener: listener}
}

// AudioProcess is an event fired when the input buffer of a
// ScriptProcessorNode is ready to be processed.
//
// https://developer.mozilla.org/docs/Web/Events/audioprocess
func AudioProcess(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "audioprocess", Listener: listener}
}

// AudioStart is an event fired when the user agent has started to capture
// audio for speech recognition.
//
Expand Down Expand Up @@ -132,9 +132,8 @@ func CanPlay(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "canplay", Listener: listener}
}

// CanPlayThrough is an event fired when the user agent can play the media, and
// estimates that enough data has been loaded to play the media up to its end
// without having to stop for further buffering of content.
// CanPlayThrough is an event fired when the user agent can play the media up
// to its end without having to stop for further buffering of content.
//
// https://developer.mozilla.org/docs/Web/Events/canplaythrough
func CanPlayThrough(listener func(*vecty.Event)) *vecty.EventListener {
Expand Down Expand Up @@ -188,10 +187,9 @@ func Close(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "close", Listener: listener}
}

// Complete is an event fired when the rendering of an OfflineAudioContext is
// terminated.
// Complete is an event fired when a transaction successfully completed.
//
// https://developer.mozilla.org/docs/Web/Events/complete
// https://developer.mozilla.org/docs/Web/Reference/Events/complete_indexedDB
func Complete(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "complete", Listener: listener}
}
Expand Down Expand Up @@ -286,6 +284,14 @@ func DeviceProximity(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "deviceproximity", Listener: listener}
}

// Devicechange is an event fired when a media device such as a camera,
// microphone, or speaker is connected or removed from the system.
//
// https://developer.mozilla.org/docs/Web/Events/devicechange
func Devicechange(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "devicechange", Listener: listener}
}

// DischargingTimeChange is an event fired when the dischargingTime attribute
// has been updated.
//
Expand Down Expand Up @@ -376,7 +382,7 @@ func DurationChange(listener func(*vecty.Event)) *vecty.EventListener {

// Emptied is an event fired when the media has become empty; for example, this
// event is sent if the media has already been loaded (or partially loaded),
// and the load() method is called to reload it.
// and the load() method is called to reload it.
//
// https://developer.mozilla.org/docs/Web/Events/emptied
func Emptied(listener func(*vecty.Event)) *vecty.EventListener {
Expand Down Expand Up @@ -594,6 +600,14 @@ func Message(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "message", Listener: listener}
}

// Messageerror is an event fired when a message error is raised when a message
// is received by an object.
//
// https://developer.mozilla.org/docs/Web/Events/messageerror
func Messageerror(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "messageerror", Listener: listener}
}

// MouseDown is an event fired when a pointing device button (usually a mouse)
// is pressed on an element.
//
Expand Down Expand Up @@ -1029,6 +1043,14 @@ func Show(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "show", Listener: listener}
}

// Slotchange is an event fired when the node contents of a HTMLSlotElement
// (<slot>) have changed.
//
// https://developer.mozilla.org/docs/Web/Events/slotchange
func Slotchange(listener func(*vecty.Event)) *vecty.EventListener {
return &vecty.EventListener{Name: "slotchange", Listener: listener}
}

// SoundEnd is an event fired when any sound — recognisable speech or not —
// has stopped being detected.
//
Expand Down
2 changes: 1 addition & 1 deletion event/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func main() {

events := make(map[string]*Event)

doc.Find(".standard-table").Eq(0).Find("tr").Each(func(i int, s *goquery.Selection) {
doc.Find("#Standard_events+p+.standard-table").Eq(0).Find("tr").Each(func(i int, s *goquery.Selection) {
cols := s.Find("td")
if cols.Length() == 0 || cols.Find(".icon-thumbs-down-alt").Length() != 0 {
return
Expand Down

0 comments on commit 1523567

Please sign in to comment.