Nathan Sobo
5e8213d45f
Add atom.allowUnsafeEval loophole and disable unsafe-eval again
...
With Node.js baked in, there's no water-tight way to prevent users from
evaluating code at runtime, at least with CSP alone. This is because
node exposes a 'vm' module that allows scripts to be compiled. There's
also `module._compile`, etc.
I think a reasonable compromise is to protect users from eval'ing code
by accident. This commit adds an atom.allowUnsafeEval method which
re-enables eval in the dynamic scope of the given function.
I then use this to compile the keystroke grammar which saves us the
complexity of pre-compiling it during specs.
What do people think?
2014-03-05 09:57:08 -07:00
Patrick Toomey
fc543fc5a6
add unsafe-eval for now
2014-03-05 09:32:49 -06:00
Patrick Toomey
2e3aec81e7
initial attempt at CSP policy to see what breaks
2014-03-05 09:03:27 -06:00
Cheng Zhao
3d27cd662a
Save the sync message in require('crash-reporter').start().
2014-02-03 19:31:40 +08:00
Cheng Zhao
c1f3aa14cd
Do not send synchronous messages in index.html.
2014-02-03 16:03:59 +08:00
probablycorey
d7638b4420
Use require('coffee-script').register()
2014-01-28 16:35:05 -08:00
Cheng Zhao
72744494b8
Also use node-vm-compatibility-layer in renderer.
2014-01-07 18:48:03 +08:00
Cheng Zhao
c287be1725
Fix bootstrap in renderer.
2014-01-07 18:48:03 +08:00
Kevin Sawicki
ad9721a893
Rename workspace-view element to workspace
2013-11-26 11:02:53 -08:00
Matt Colyer
33538a5ed7
Use .workspace
rather than body
for keybindings
2013-11-19 16:57:10 -08:00
Kevin Sawicki
d989aeb592
Focus body when root view has no focusable children
...
This is required now that root view has a tab index
2013-10-16 13:35:11 -07:00
Kevin Sawicki
8f2770d084
Prevent overriding coffee cache once registered
...
Previously this was done afterwards in index.html and task.coffee
but should really be handled by the cache itself so any module
require a different version of coffee-script are not reregistering
a different require extension handler.
2013-10-04 09:25:31 -07:00
Kevin Sawicki
8be254c878
Export a register method from coffee-cache
...
This allows it to be required without having any side effects which
is needed for the clean task that just wanted to remove the cache
directory.
2013-10-04 09:20:46 -07:00
Kevin Sawicki
ee388b2600
Set window size and position before showing
...
Previously a new dev window that threw an error during bootstrap
would not be displayed.
2013-10-01 08:37:14 -07:00
Kevin Sawicki
73fab20d7e
Use relative require path for coffee-cache
2013-09-20 10:02:20 -07:00
Kevin Sawicki
bc76b70552
Add SHA-1 based CoffeeScript compile cache
...
This restores the require cache that was used pre-node integration
2013-09-09 18:56:15 +01:00
Kevin Sawicki
e03544bab6
Hide body when unloading
...
This prevents a weird UI flicker when refreshing with the settings
view open.
2013-08-29 15:23:26 -07:00
Kevin Sawicki & Nathan Sobo
e705e3e045
Don't allow caching of coffee requires to be overridden
...
Previously coffeestack was requiring a different version of coffeescript
than atom was, which had a side effect of re-registering the extension
handler for .coffee requires. This disabled coffee-cache, which made
require really slow again.
2013-07-22 11:44:39 -07:00
Cheng Zhao
f9545acde6
Show window before opening devtools.
...
It may happen that an exception is thrown before window is shown.
2013-06-27 19:29:35 +08:00
Kevin Sawicki
327f16fa03
Add semicolon
2013-06-11 15:44:25 -07:00
Corey Johnson & Kevin Sawicki
fc52ee518e
Wait for window:loaded before emitting window:open-path
2013-06-11 14:48:51 -07:00
Corey Johnson & Kevin Sawicki
bcc16fbefe
Remove hash params from url
...
Load settings are now stored on the browser window.
2013-06-11 11:17:16 -07:00
Kevin Sawicki
dea0e08d93
Use hash instead of query string for parameters
...
This allows the pathToOpen to be changed when the project
path changes.
Previously if the untitled window file was saved, the project
path would be forever associated with the undefined window.
Now when the project path changes, the pathToOpen changes so
that the state is persisted to the project area and the untitled
window never has a project.
2013-06-07 10:50:06 -07:00
Cheng Zhao
bb114932ea
Correctly set NODE_PATH before opening window.
2013-05-13 19:57:07 +08:00
Kevin Sawicki & Nathan Sobo
aaf0d48edf
Use coffee-cache module
2013-03-12 14:59:21 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1
Use node's require instead of internal require
2013-03-12 10:38:05 -07:00
Cheng Zhao
091851ee3d
First taste of node.
2013-03-05 09:10:04 +01:00
Kevin Sawicki
64332736e1
Add back background on html element
...
This prevents a flash of white from displaying while the CSS loads
2013-01-23 08:22:46 -08:00
Jon Rohan
42808ac9ae
remove the html color, and /themes doesn't exist anymore
2013-01-21 18:38:00 -08:00
Kevin Sawicki
17e7e05e8b
Set background color on root HTML element
2013-01-17 16:50:25 -08:00
Kevin Sawicki
5c2b7b400d
Decode param name and value
...
These can contain percent encodings that
will need to be decoded before used.
2012-12-19 15:37:41 -08:00
Corey Johnson & Nathan Sobo
85c37fd652
Move atom.resourcePath to window.resourcePath
...
The resourcePath is now set using a url param. Because resourcePath is needed by require.js, it needs to be on `window` rather than `atom`.
2012-09-10 17:22:21 -07:00
Corey Johnson & Nathan Sobo
27335661dc
WIP: Getting specs and benchmarks running from the command line
2012-08-30 18:10:05 -06:00
Nathan Sobo
3cc2faf7c2
Add atom.showDevTools
and replace calls to $native.showDevTools
2012-08-30 11:24:01 -06:00
Corey Johnson
6f99b61dd3
Now storing a window's state based on its rootDirectory (instead of on windowNumber)
2012-08-29 10:59:45 -07:00
Corey Johnson & Nathan Sobo
d20ba7171a
Assign $windowNumber in index.html
2012-08-27 17:09:53 -07:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Corey Johnson & Nathan Sobo
7adc7a8c7e
Pass pathToOpen
as a query param when opening window
2012-08-27 13:19:12 -07:00
Nathan Sobo
c3e748a17c
WIP: Use rake to start compiling resources (like require.coffee)
2012-08-26 16:29:46 -05:00
Nathan Sobo
72468b7028
Pass the bootstrap script as a query parameter of the initial url string
2012-08-26 16:10:11 -05:00
Corey Johnson
ccfc15d132
Dev tools working
2012-08-23 12:38:52 -07:00
Corey Johnson
e15897afec
trying to get devtools to work
2012-08-22 15:29:39 -07:00
Corey Johnson
1f2453e98c
Atom is getting closer...
2012-08-21 17:22:43 -07:00
Corey Johnson
33048bc971
Move the index file to the root of the resources
...
dir.
This will stop the DOM errors for localStorage!
2011-09-12 12:18:23 -07:00
Chris Wanstrath
804b67f8df
osx.coffee is dead.
...
Split Chrome into App and Window, in app.coffee and window.coffee
2011-09-04 14:17:46 -07:00
Corey Johnson
4b66101755
just adding the editor pane statically
2011-09-02 19:28:05 -07:00
Corey Johnson
02028e156e
box-flow all the things
2011-09-02 18:05:27 -07:00
Chris Wanstrath
b7fba87b06
So that's why my fonts looked off...
2011-09-02 16:33:13 -07:00
Chris Wanstrath
adc94d662f
apple ui font
2011-08-30 01:12:26 -07:00
Corey Johnson
cda771594d
panes decide how big they should be.
2011-08-29 11:02:01 -07:00