mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(FrameManager): add type=module to addScriptTag (#2090)
This patch adds a new "type" option to the `addScriptTag` method that allows adding "module" tags to the page. Fixes #2078
This commit is contained in:
committed by
Andrey Lushnikov
parent
552be1ae87
commit
625c7ebdda
5
test/assets/es6/.eslintrc
Normal file
5
test/assets/es6/.eslintrc
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
}
|
||||
}
|
||||
2
test/assets/es6/es6import.js
Normal file
2
test/assets/es6/es6import.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import num from './es6module.js';
|
||||
window.__es6injected = num;
|
||||
1
test/assets/es6/es6module.js
Normal file
1
test/assets/es6/es6module.js
Normal file
@@ -0,0 +1 @@
|
||||
export default 42;
|
||||
2
test/assets/es6/es6pathimport.js
Normal file
2
test/assets/es6/es6pathimport.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import num from './es6/es6module.js';
|
||||
window.__es6injected = num;
|
||||
Reference in New Issue
Block a user