File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def create_js_context
75
75
bundle_js_code = File . read ( server_js_file )
76
76
base_js_code = <<-JS
77
77
#{ console_polyfill }
78
+ #{ execjs_timer_polyfills }
78
79
#{ bundle_js_code } ;
79
80
JS
80
81
begin
@@ -102,6 +103,18 @@ def create_js_context
102
103
end
103
104
end
104
105
106
+ def execjs_timer_polyfills
107
+ <<-JS
108
+ function setInterval() {
109
+ conosle.error('setInterval is not defined for execJS. See https://github.com/sstephenson/execjs#faq');
110
+ }
111
+
112
+ function setTimeout() {
113
+ conosle.error('setTimeout is not defined for execJS. See https://github.com/sstephenson/execjs#faq');
114
+ }
115
+ JS
116
+ end
117
+
105
118
# Reimplement console methods for replaying on the client
106
119
def console_polyfill
107
120
<<-JS
You can’t perform that action at this time.
0 commit comments