mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
chore: Remove radix from parseInt, simplify Blockly.utils.dom methods, use Unicode characters. (#6441)
* chore: remove radix from parseInt Previously any number starting with '0' would be parsed as octal if the radix was left blank. But this was changed years ago. It is no longer needed to specify a radix. * chore: 'ID' is identification 'id' is a part of Freud's brain. * Use Unicode characters instead of codes This is in line with the current style guide. * Simplify Blockly.utils.dom methods. classList add/remove/has supports SVG elements in all browsers Blockly supports (i.e. not IE).
This commit is contained in:
@@ -344,9 +344,9 @@ suite('Utils', function() {
|
||||
const p = document.createElement('p');
|
||||
p.className = ' one three two three ';
|
||||
Blockly.utils.dom.removeClass(p, 'two');
|
||||
chai.assert.equal(p.className, 'one three three', 'Removing "two"');
|
||||
chai.assert.equal(p.className, 'one three', 'Removing "two"');
|
||||
Blockly.utils.dom.removeClass(p, 'four');
|
||||
chai.assert.equal(p.className, 'one three three', 'Removing "four"');
|
||||
chai.assert.equal(p.className, 'one three', 'Removing "four"');
|
||||
Blockly.utils.dom.removeClass(p, 'three');
|
||||
chai.assert.equal(p.className, 'one', 'Removing "three"');
|
||||
Blockly.utils.dom.removeClass(p, 'ne');
|
||||
|
||||
Reference in New Issue
Block a user