axe-core-api 4.3.2 → 4.3.3.pre.af5e58f
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/axe/core.rb +7 -7
- data/lib/loader.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afc85ffc90dc634aebe6fbe0d1c20650f302d515eea66eb8d6c82058ceb7a1eb
|
4
|
+
data.tar.gz: 133ceca8c0a21b2ef4daa94e7be0a4c9048b7827297a3657378684a73b5386f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc83882275a776f6350230ef65338ec74c6d1b346b46df1a164fd83daad53d6c52689ac2ac42199de87d04b7f13a446e144fde4ff84a2262247ad88964714b75
|
7
|
+
data.tar.gz: 392dd0d726f4c17a63c262f6e3497518a2996f8f14cce7630ce8c8663aea8b042d288530f72f9f249372140219c43ed9285c492ffe6f0972512e5cbfbca20adc
|
data/lib/axe/core.rb
CHANGED
@@ -25,10 +25,16 @@ module Axe
|
|
25
25
|
callable.call @page
|
26
26
|
end
|
27
27
|
|
28
|
+
def self.has_run_partial?(page)
|
29
|
+
page.evaluate_script <<-JS
|
30
|
+
typeof window.axe.runPartial === 'function'
|
31
|
+
JS
|
32
|
+
end
|
33
|
+
|
28
34
|
private
|
29
35
|
|
30
36
|
def use_run_partial
|
31
|
-
has_run_partial? and not Axe::Configuration.instance.legacy_mode
|
37
|
+
Core.has_run_partial?(@page) and not Axe::Configuration.instance.legacy_mode
|
32
38
|
end
|
33
39
|
|
34
40
|
def load_axe_core(source)
|
@@ -40,12 +46,6 @@ module Axe
|
|
40
46
|
loader.call source
|
41
47
|
end
|
42
48
|
|
43
|
-
def has_run_partial?
|
44
|
-
@page.evaluate_script <<-JS
|
45
|
-
typeof window.axe.runPartial === 'function'
|
46
|
-
JS
|
47
|
-
end
|
48
|
-
|
49
49
|
def already_loaded?
|
50
50
|
@page.evaluate_script <<-JS
|
51
51
|
window.#{JS_NAME} &&
|
data/lib/loader.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative "./axe/configuration"
|
2
|
+
require_relative "./axe/core"
|
2
3
|
require_relative "./hooks"
|
3
4
|
|
4
5
|
module Common
|
@@ -25,8 +26,8 @@ module Common
|
|
25
26
|
private
|
26
27
|
|
27
28
|
def set_allowed_origins
|
28
|
-
allowed_origins = "<
|
29
|
-
allowed_origins = "<
|
29
|
+
allowed_origins = "<same_origin>"
|
30
|
+
allowed_origins = "<unsafe_all_origins>" if !Axe::Configuration.instance.legacy_mode && !Axe::Core::has_run_partial?(@page)
|
30
31
|
@page.execute_script "axe.configure({ allowedOrigins: ['#{allowed_origins}'] });"
|
31
32
|
end
|
32
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axe-core-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.3.pre.af5e58f
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deque Systems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|
@@ -189,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: 2.3.0
|
190
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - "
|
192
|
+
- - ">"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 1.3.1
|
195
195
|
requirements: []
|
196
196
|
rubygems_version: 3.0.3
|
197
197
|
signing_key:
|