Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/ui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ closure_js_library(
":injector",
":keyboard",
"@com_google_javascript_closure_library//closure/goog/asserts",
"@com_google_javascript_closure_library//closure/goog/asserts:dom",
"@com_google_javascript_closure_library//closure/goog/dom",
"@com_google_javascript_closure_library//closure/goog/events",
"@com_google_javascript_closure_library//closure/goog/events:eventhandler",
Expand All @@ -37,7 +38,7 @@ closure_js_library(
"history/event.js",
],
deps = [
"@com_google_javascript_closure_library//closure/goog/asserts",
"@com_google_javascript_closure_library//closure/goog/asserts:dom",
"@com_google_javascript_closure_library//closure/goog/dom",
"@com_google_javascript_closure_library//closure/goog/dom:tagname",
"@com_google_javascript_closure_library//closure/goog/events",
Expand Down Expand Up @@ -124,6 +125,7 @@ closure_js_library(
deps = [
":core",
"@com_google_javascript_closure_library//closure/goog/asserts",
"@com_google_javascript_closure_library//closure/goog/asserts:dom",
"@com_google_javascript_closure_library//closure/goog/dom",
],
)
Expand Down
4 changes: 2 additions & 2 deletions js/ui/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const BgColorTransform = goog.require('goog.fx.dom.BgColorTransform');
const ComponentEventType = goog.require('goog.ui.Component.EventType');
const GoogUiComponent = goog.require('goog.ui.Component');
const GoogUiControl = goog.require('goog.ui.Control');
// const Route = goog.require('stack.ui.Route');
const asserts = goog.require('goog.asserts');
const assertsDom = goog.require('goog.asserts.dom');
const easing = goog.require('goog.fx.easing');
const strings = goog.require('goog.string');
const style = goog.require('goog.style');
Expand Down Expand Up @@ -275,7 +275,7 @@ class Component extends GoogUiComponent {
var end = opt_end || [256, 256, 256];
var time = opt_time || 250;
var accel = opt_accel || easing.easeOutLong;
var element = opt_element || asserts.assertElement(this.getContentElement());
var element = opt_element || assertsDom.assertIsElement(this.getContentElement());

fx = this.fx_ =
new BgColorTransform(element, start, end, time, accel);
Expand Down
3 changes: 2 additions & 1 deletion js/ui/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Injector = goog.require('stack.ui.Injector');
const Keyboard = goog.require('stack.ui.Keyboard');
const Resolver = goog.require('goog.promise.Resolver');
const asserts = goog.require('goog.asserts');
const assertsDom = goog.require('goog.asserts.dom');
const dom = goog.require('goog.dom');
const easing = goog.require('goog.fx.easing');
const events = goog.require('goog.events');
Expand Down Expand Up @@ -683,7 +684,7 @@ class Component extends GoogUiComponent {
var end = opt_end || [256, 256, 256];
var time = opt_time || 250;
var accel = opt_accel || easing.easeOutLong;
var element = opt_element || asserts.assertElement(this.getContentElement());
var element = opt_element || assertsDom.assertIsElement(this.getContentElement());

fx = this.fx_ =
new BgColorTransform(element, start, end, time, accel);
Expand Down
4 changes: 2 additions & 2 deletions js/ui/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const HistoryEvent = goog.require('goog.history.Event');
const HistoryEventType = goog.require('goog.history.EventType');
const Html5History = goog.require('goog.history.Html5History');
const TagName = goog.require('goog.dom.TagName');
const asserts = goog.require('goog.asserts');
const assertsDom = goog.require('goog.asserts.dom');
const dom = goog.require('goog.dom');
const events = goog.require('goog.events');
const strings = goog.require('goog.string');
Expand Down Expand Up @@ -54,7 +54,7 @@ class History extends EventTarget {
// Element that was clicked could be a child of of the <a>, so
// look up through the ancestry chain.
let anchor = /** @type {?HTMLAnchorElement} */ (
dom.getAncestor(asserts.assertElement(e.target),
dom.getAncestor(assertsDom.assertIsElement(e.target),
el => el instanceof HTMLElement && el.tagName === TagName.A.toString(),
true)
);
Expand Down
3 changes: 2 additions & 1 deletion js/ui/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
goog.module('stack.ui.Syntax');

const asserts = goog.require('goog.asserts');
const assertsDom = goog.require('goog.asserts.dom');
const dom = goog.require('goog.dom');
const { Component } = goog.require('stack.ui');

Expand Down Expand Up @@ -43,7 +44,7 @@ class Syntax extends Component {
*/
getCodeElement() {
return /** @type{!HTMLSpanElement} */(
asserts.assertElement(
assertsDom.assertIsElement(
/** @type{!HTMLElement} */(
this.getElementStrict()
).firstElementChild
Expand Down