blob: c8f8f5a00014e040bc4448507fb26e6124f0f446 [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.
* @description
import "dart:html";
import "../../testcommon.dart";
import "../../../Utils/async_utils.dart";
main() {
var style = new Element.html('''
span { display: none }
*[test^="0"] #sp { color: green; display: block}
''', treeSanitizer: new NullTreeSanitizer());
<div test="1">
Test for bug <a href=""></a>
<p>This test checks whether CSS attribute selector [att^=val] is re-evaluated after attribute changes in DOM elements which have no style associated with them.</p>
<span id="sp">PASSED</span>
''', treeSanitizer: new NullTreeSanitizer());
change() {
var element = document.getElementsByTagName('div')[0];
element.attributes['test'] = '0XYZ';
startTest() {
// Trigger an attribute change after all load processing is done. Doing the change
// here immediately does not exhibit the problem.
setTimeout(change, 0);