Class: Common::Loader
- Inherits:
-
Object
- Object
- Common::Loader
- Defined in:
- lib/loader.rb
Instance Method Summary collapse
- #call(source, is_top_level = true) ⇒ Object
-
#initialize(page, lib) ⇒ Loader
constructor
A new instance of Loader.
- #load_top_level(source) ⇒ Object
Constructor Details
#initialize(page, lib) ⇒ Loader
Returns a new instance of Loader.
7 8 9 10 11 |
# File 'lib/loader.rb', line 7 def initialize(page, lib) @page = page @lib = lib @loaded_top_level = false end |
Instance Method Details
#call(source, is_top_level = true) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/loader.rb', line 19 def call(source, is_top_level = true) @page.execute_script source unless (@loaded_top_level and is_top_level) set_allowed_origins Common::Hooks.run_after_load @lib load_into_iframes(source) unless Axe::Configuration.instance.skip_iframes end |