Patch to follow.
Scripts added with var scriptElement = document.createElement("script"); scriptElement.src = url; document.head.appendChild(scriptElement); Are not shown if inspector is opened after the script was loaded. var scriptElement = document.createElement("script"); scriptElement.textContent = script; document.head.appendChild(scriptElement); are not shown at all.
Created attachment 168711 [details] Patch
Committed r131302: <http://trac.webkit.org/changeset/131302>
(In reply to comment #3) > Committed r131302: <http://trac.webkit.org/changeset/131302> It broke 2 tests everywhere: --- /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/http/tests/inspector-enabled/dynamic-scripts-expected.txt +++ /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/http/tests/inspector-enabled/dynamic-scripts-actual.txt @@ -4,9 +4,5 @@ UISourceCodes: dynamic-script.js dynamic-scripts.html - dynamic-scripts.html (1) - dynamic-scripts.html (2) - evalSourceURL.js inspector-test.js - scriptElementContentSourceURL.js --- /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/inspector/debugger/dynamic-scripts-expected.txt +++ /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/inspector/debugger/dynamic-scripts-actual.txt @@ -5,9 +5,5 @@ UISourceCodes: dynamic-script.js dynamic-scripts.html - dynamic-scripts.html (1) - dynamic-scripts.html (2) - evalSourceURL.js inspector-test.js - scriptElementContentSourceURL.js
Thanks for the headsup, Landed a fix: Committed r131309: <http://trac.webkit.org/changeset/131309>