Sha256: 0c36df343f5700f3702bd9d641a0b31325783f92703e54c51b9f7a7d01ee1185

Contents?: true

Size: 729 Bytes

Versions: 3

Compression:

Stored size: 729 Bytes

Contents

module Hyperstack
  module Component
    module WhileLoading
      def __hyperstack_component_rescue_wrapper(child)
        Hyperstack::Internal::Component::WhileLoadingWrapper(child: self, children_elements: child)
      end

      def resources_loading?
        @__hyperstack_while_loading_waiting_on_resources
      end

      def resources_loaded?
        !@__hyperstack_while_loading_waiting_on_resources
      end

      if Hyperstack::Component::IsomorphicHelpers.on_opal_client?
        %x{
          function onError(event) {
            if (event.message.startsWith('Uncaught NotQuiet: ')) event.preventDefault();
          }

          window.addEventListener('error', onError);
         }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hyper-component-1.0.alpha1.5 lib/hyperstack/component/while_loading.rb
hyper-component-1.0.alpha1.4 lib/hyperstack/component/while_loading.rb
hyper-component-1.0.alpha1.3 lib/hyperstack/component/while_loading.rb