Commit Graph

2 Commits

Author SHA1 Message Date
Albert Juhé Lluveras 794e50e53f Extract function from lazyLoadScript to simplify code (https://github.com/woocommerce/woocommerce-blocks/pull/4631)
* Extract function from lazyLoadScript to simplify code

* Prevent TS errors when assigning attributes to script element

* Update assets/js/base/utils/lazy-load-script.ts

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update assets/js/base/utils/lazy-load-script.ts

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2021-09-02 08:46:08 +02:00
Albert Juhé Lluveras 2b2631d7ab Add Mini Cart block in experimental builds (https://github.com/woocommerce/woocommerce-blocks/pull/4510)
* Create MiniCart block prototype

* Use window.onload instead of DOMContentLoaded

* Don't load translations for scripts without localized strings

* Don't try to load cart instance in API requests

* Remove PHP pre-rendering

* Fix some typos

* Move Mini Cart block files under 'cart-checkout' directory

* Update selectors to follow guidelines

* Only enable the MiniCart block in experimental builds

* Fix wrong translations element selector

* Improve lazyLoadScript and preloadScript documentation

* Move lazy-load-script and preload-script to base-utils

* Add function to check if script tag is already in the DOM
2021-08-25 17:42:55 +02:00