Add multiple attr in d3 at once

Add multiple attr in d3 at once
0

#1

How to add multiple attributes in d3 v5 like this

svg.attr({
   width: w, 
  height: h
});

this method may works in v3.