mirror of
https://github.com/atom/atom.git
synced 2026-02-18 02:21:43 -05:00
Move document mutation to startEditorWindow
This commit is contained in:
@@ -247,14 +247,6 @@ class Atom extends Model
|
||||
#
|
||||
# Call after this instance has been assigned to the `atom` global.
|
||||
initialize: ->
|
||||
@setBodyPlatformClass()
|
||||
|
||||
{devMode, safeMode, resourcePath} = @getLoadSettings()
|
||||
configDirPath = @getConfigDirPath()
|
||||
|
||||
|
||||
document.head.appendChild(new StylesElement)
|
||||
|
||||
if grammarOverridesByPath = @state.grammars?.grammarOverridesByPath
|
||||
@grammars.grammarOverridesByPath = grammarOverridesByPath
|
||||
|
||||
@@ -577,6 +569,9 @@ class Atom extends Model
|
||||
|
||||
@loadConfig()
|
||||
@themes.loadBaseStylesheets()
|
||||
|
||||
@setBodyPlatformClass()
|
||||
document.head.appendChild(new StylesElement)
|
||||
@packages.loadPackages()
|
||||
@deserializeEditorWindow()
|
||||
|
||||
|
||||
@@ -191,7 +191,10 @@ class MenuManager
|
||||
|
||||
# Get an {Array} of {String} classes for the given element.
|
||||
classesForElement: (element) ->
|
||||
element?.classList.toString().split(' ') ? []
|
||||
if classList = element?.classList
|
||||
Array::slice.apply(classList)
|
||||
else
|
||||
[]
|
||||
|
||||
sortPackagesMenu: ->
|
||||
packagesMenu = _.find @template, ({label}) -> MenuHelpers.normalizeLabel(label) is 'Packages'
|
||||
|
||||
@@ -132,7 +132,6 @@ class Package
|
||||
@activationPromise ?=
|
||||
new Promise (resolve, reject) =>
|
||||
@resolveActivationPromise = resolve
|
||||
@rejectActivationPromise = reject
|
||||
@measure 'activateTime', =>
|
||||
try
|
||||
@activateResources()
|
||||
@@ -370,10 +369,8 @@ class Package
|
||||
console.error "Error serializing package '#{@name}'", e.stack
|
||||
|
||||
deactivate: ->
|
||||
@rejectActivationPromise?()
|
||||
@activationPromise = null
|
||||
@resolveActivationPromise = null
|
||||
@rejectActivationPromise = null
|
||||
@activationCommandSubscriptions?.dispose()
|
||||
@deactivateResources()
|
||||
@deactivateConfig()
|
||||
|
||||
Reference in New Issue
Block a user