DOMNode.fromJson constructor
DOMNode.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DOMNode.fromJson(Map<String, dynamic> json) {
return DOMNode(
nodeType: json['nodeType'] as int,
nodeName: json['nodeName'] as String,
nodeValue: json['nodeValue'] as String,
textValue:
json.containsKey('textValue') ? json['textValue'] as String : null,
inputValue:
json.containsKey('inputValue') ? json['inputValue'] as String : null,
inputChecked: json.containsKey('inputChecked')
? json['inputChecked'] as bool
: null,
optionSelected: json.containsKey('optionSelected')
? json['optionSelected'] as bool
: null,
backendNodeId: dom.BackendNodeId.fromJson(json['backendNodeId'] as int),
childNodeIndexes: json.containsKey('childNodeIndexes')
? (json['childNodeIndexes'] as List).map((e) => e as int).toList()
: null,
attributes: json.containsKey('attributes')
? (json['attributes'] as List)
.map((e) => NameValue.fromJson(e as Map<String, dynamic>))
.toList()
: null,
pseudoElementIndexes: json.containsKey('pseudoElementIndexes')
? (json['pseudoElementIndexes'] as List).map((e) => e as int).toList()
: null,
layoutNodeIndex: json.containsKey('layoutNodeIndex')
? json['layoutNodeIndex'] as int
: null,
documentURL: json.containsKey('documentURL')
? json['documentURL'] as String
: null,
baseURL: json.containsKey('baseURL') ? json['baseURL'] as String : null,
contentLanguage: json.containsKey('contentLanguage')
? json['contentLanguage'] as String
: null,
documentEncoding: json.containsKey('documentEncoding')
? json['documentEncoding'] as String
: null,
publicId:
json.containsKey('publicId') ? json['publicId'] as String : null,
systemId:
json.containsKey('systemId') ? json['systemId'] as String : null,
frameId: json.containsKey('frameId')
? page.FrameId.fromJson(json['frameId'] as String)
: null,
contentDocumentIndex: json.containsKey('contentDocumentIndex')
? json['contentDocumentIndex'] as int
: null,
pseudoType: json.containsKey('pseudoType')
? dom.PseudoType.fromJson(json['pseudoType'] as String)
: null,
shadowRootType: json.containsKey('shadowRootType')
? dom.ShadowRootType.fromJson(json['shadowRootType'] as String)
: null,
isClickable:
json.containsKey('isClickable') ? json['isClickable'] as bool : null,
eventListeners: json.containsKey('eventListeners')
? (json['eventListeners'] as List)
.map((e) => dom_debugger.EventListener.fromJson(
e as Map<String, dynamic>))
.toList()
: null,
currentSourceURL: json.containsKey('currentSourceURL')
? json['currentSourceURL'] as String
: null,
originURL:
json.containsKey('originURL') ? json['originURL'] as String : null,
scrollOffsetX: json.containsKey('scrollOffsetX')
? json['scrollOffsetX'] as num
: null,
scrollOffsetY: json.containsKey('scrollOffsetY')
? json['scrollOffsetY'] as num
: null,
);
}