Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: sky/engine/core/html/parser/HTMLScriptRunner.cpp

Issue 950493003: Add a basic sky-element custom element (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/html/parser/HTMLScriptRunner.h" 6 #include "sky/engine/core/html/parser/HTMLScriptRunner.h"
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "sky/engine/core/app/AbstractModule.h" 9 #include "sky/engine/core/app/AbstractModule.h"
10 #include "sky/engine/core/dom/Document.h" 10 #include "sky/engine/core/dom/Document.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (!module) 108 if (!module)
109 return scriptFailed(); 109 return scriptFailed();
110 110
111 advanceTo(StateExecuting); 111 advanceTo(StateExecuting);
112 112
113 // Ian says we'll remove microtasks, but for now execute them right before 113 // Ian says we'll remove microtasks, but for now execute them right before
114 // we "run" the script (call 'init'), not at dependency resolution 114 // we "run" the script (call 'init'), not at dependency resolution
115 // or script failures, etc. 115 // or script failures, etc.
116 Microtask::performCheckpoint(); 116 Microtask::performCheckpoint();
117 117
118 if (LocalFrame* frame = contextFrame(m_element.get())) 118 if (LocalFrame* frame = contextFrame(m_element.get())) {
119 frame->dart().ExecuteLibraryInModule(module.get(), library->dart_value()); 119 frame->dart().ExecuteLibraryInModule(module.get(),
eseidel 2015/02/21 00:08:13 We should just pass the script and hang the librar
abarth-chromium 2015/02/21 05:40:05 Ok. I'll do this in a later CL.
120 library->dart_value(),
121 m_element.get());
122 }
120 123
121 advanceTo(StateCompleted); 124 advanceTo(StateCompleted);
122 // We may be deleted at this point. 125 // We may be deleted at this point.
123 } 126 }
124 127
125 } 128 }
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/script/dart_controller.h » ('j') | sky/examples/example-element/example-element.sky » ('J')

Powered by Google App Engine
This is Rietveld 408576698