EventListener.fromJson constructor
EventListener.fromJson(
- Map<String, dynamic> json
)
Implementation
factory EventListener.fromJson(Map<String, dynamic> json) {
return EventListener(
type: json['type'] as String,
useCapture: json['useCapture'] as bool? ?? false,
passive: json['passive'] as bool? ?? false,
once: json['once'] as bool? ?? false,
scriptId: runtime.ScriptId.fromJson(json['scriptId'] as String),
lineNumber: json['lineNumber'] as int,
columnNumber: json['columnNumber'] as int,
handler: json.containsKey('handler')
? runtime.RemoteObject.fromJson(
json['handler'] as Map<String, dynamic>)
: null,
originalHandler: json.containsKey('originalHandler')
? runtime.RemoteObject.fromJson(
json['originalHandler'] as Map<String, dynamic>)
: null,
backendNodeId: json.containsKey('backendNodeId')
? dom.BackendNodeId.fromJson(json['backendNodeId'] as int)
: null,
);
}