add src attribute support

just another PR abort src, fix some bug in code style:)
这里忘了改回 cb