more has(event-link-onload-api) encapsulation, fix onerror handler, minor fixes
wrap build code with has(builder) so it can be stripped by the build

(cherry picked from commit b26b33299ce94e6b96ae4665ad9ee887ed017577)

Conflicts:
	css.js