You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One problem here is naming. Since the struct (or event) is called paused, and the parameter is called reason, I think it makes sense to name it PausedReason. This works well for the most part, but can result in some really long names, EmulateTouchFromMouseEventButtonNone, or in the worst case, names that do not work at all: ForcePseudoStateForcedPseudoClassesActive.
If we were to name them differently, e.g. just Reason it would not work with e.g. ObjectPreview.Subtype (name Subtype) since this name is shared between ObjectPreview, PropertyPreview and RemoteObject. Also, the enum for RemoteObject differs from ObjectPreview and PropertyPreview, which seems like a bug.
Since some props/params share enums it might be nice to have these types as part of the domain, and it would also ease with the naming of things.
I think the next step is to report/request this to the chrome-debugging-protocol mailing list.
The text was updated successfully, but these errors were encountered:
Some types, commands and events contain unnamed enums. Unnamed meaning they do not reference any domain type.
Take
debugger.PausedReply
for example, it contains aReason
of typestring
. This is actually anenum
without a name defined in the protocol by:This could easily be translated into:
One problem here is naming. Since the struct (or event) is called
paused
, and the parameter is calledreason
, I think it makes sense to name itPausedReason
. This works well for the most part, but can result in some really long names,EmulateTouchFromMouseEventButtonNone
, or in the worst case, names that do not work at all:ForcePseudoStateForcedPseudoClassesActive
.If we were to name them differently, e.g. just
Reason
it would not work with e.g.ObjectPreview.Subtype
(nameSubtype
) since this name is shared betweenObjectPreview
,PropertyPreview
andRemoteObject
. Also, the enum forRemoteObject
differs fromObjectPreview
andPropertyPreview
, which seems like a bug.Since some props/params share enums it might be nice to have these types as part of the domain, and it would also ease with the naming of things.
I think the next step is to report/request this to the
chrome-debugging-protocol
mailing list.The text was updated successfully, but these errors were encountered: