blob: d0dc3a3dc22d8a98b74ee7d694d8ea6c2d71c1bb [file] [log] [blame]
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion final Node nextNode
/// The next sibling node.
/// @description Checks expected attribute values.
import "dart:html";
import "../../../Utils/expect.dart";
main() {
var x = new Element.html('<span></span>');
x = new Element.html(
'<div><span>span1</span>text node<span>span2</span></div>');
var y = x.firstChild; // span1
Expect.equals('span1', y?.text);
y = y?.nextNode; // text node should not be skipped
Expect.equals('text node', y?.text);
y = y?.nextNode; // span2
Expect.equals('span2', y?.text);
y = y?.nextNode;